Function at 0x4df9e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x340
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x33c], eax
push ebx
mov ebx, dword [esp + 0x34c]
push ebp
mov ebp, dword [esp + 0x358]
push esi
push edi
mov esi, ecx
cmp ebp, 3
je 0x4dfa29
cmp ebp, 2
je 0x4dfb05
cmp ebp, 1
je 0x4dfb05
mov eax, 0x10000
jmp 0x4dfdad
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x354]
cmp edi, eax
je 0x4dfaa3
cmp eax, 0xffffffff
je 0x4dfa47
mov eax, dword [esi]
push eax
call fcn.004d4fc0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4dfa1f
cmp edi, dword [eax + 0x10]
jge 0x4dfa71
push eax
call fcn.004d4d10
add esp, 4
test eax, eax
je 0x4dfa71
mov eax, 0x700
jmp 0x4dfdad
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x4dfa8e
mov edx, dword [esi]
push edx
call fcn.004d4d60
add esp, 4
test eax, eax
jne 0x4dfa67
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x4dfa78
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.004df510
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x35c]
mov edx, dword [esi]
lea eax, [esp + 0x13]
push eax
push ecx
push ebx
push edx
call fcn.004df6a0
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x4dfad4
mov eax, dword [esi]
push eax
call fcn.004d4fc0
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x4dfbc0
test edi, edi
jle 0x4dfaed
mov eax, 0x600
jmp 0x4dfdad
mov eax, edi
sub eax, 0xffffff96
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
jmp 0x4dfdad
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x4dfb18
mov ecx, dword [esi]
push ecx
call fcn.004d4fc0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x354]
cmp edi, dword [eax + 4]
jge 0x4dfa1f
cmp edi, dword [eax + 0x10]
jge 0x4dfb43
push eax
call fcn.004d4d10
add esp, 4
test eax, eax
jne 0x4dfa67
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x4dfb6a
lea ebx, [ebx]
mov eax, dword [esi]
push eax
call fcn.004d4d60
add esp, 4
test eax, eax
jne 0x4dfa67
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jl 0x4dfb50
lea edx, [esp + 0x18]
push edx
push edi
mov ecx, esi
call fcn.004d5040
mov eax, dword [esp + 0x120]
shr eax, 4
test al, 1
je 0x4dfbc7
cmp ebp, 1
je 0x4dfbc0
mov al, byte [ebx]
cmp al, 0x2f
je 0x4dfb9e
cmp al, 0x5c
je 0x4dfb9e
test al, al
je 0x4dfbb0
cmp byte [ebx + 1], 0x3a
jne 0x4dfbb0
push ebx
push 0
call fcn.004d5590
add esp, 8
xor eax, eax
jmp 0x4dfdad
push ebx
add esi, 0x140
push esi
call fcn.004d5590
add esp, 8
xor eax, eax
jmp 0x4dfdad
mov byte [esp + 0x248], 0
cmp ebp, 1
je 0x4dfc6f
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
test al, al
je 0x4dfbf5
cmp al, 0x2f
je 0x4dfbea
cmp al, 0x5c
jne 0x4dfbed
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4dfbe2
push 0x104
lea ecx, [esp + 0x148]
push ebx
push ecx
call fcn.005e2f3c
add esp, 0xc
cmp edi, ebx
jne 0x4dfc7e
mov byte [esp + 0x144], 0
push edi
lea eax, [esp + 0x148]
push eax
lea ebx, [esi + 0x140]
push ebx
lea ecx, [esp + 0x254]
push 0x647ed0
push ecx
call fcn.005dfb23
lea edx, [esp + 0x158]
push edx
push ebx
call fcn.004d5590
add esp, 0x1c
mov eax, dword [esp + 0x120]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4dfce1
mov eax, 0x200
jmp 0x4dfdad
mov edx, edi
sub edx, ebx
mov byte [esp + edx + 0x144], 0
mov al, byte [esp + 0x144]
cmp al, 0x2f
je 0x4dfcaf
cmp al, 0x5c
je 0x4dfcaf
test al, al
je 0x4dfc17
cmp byte [esp + 0x145], 0x3a
jne 0x4dfc17
push edi
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x250]
push 0x626500
push ecx
call fcn.005dfb23
lea edx, [esp + 0x154]
push edx
push 0
call fcn.004d5590
add esp, 0x18
jmp 0x4dfc4a
mov edx, dword [esi + 0x138]
mov eax, dword [esi]
push edx
push eax
call fcn.004df510
add esp, 8
cmp dword [esi + 0x13c], 0
jne 0x4dfd0f
push 0x4000
call fcn.005ddec6
add esp, 4
mov dword [esi + 0x13c], eax
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4dfd20
mov edx, dword [esi + 0x13c]
mov eax, dword [esi]
lea ecx, [esp + 0x13]
push ecx
push 0x4000
push edx
push eax
call fcn.004df6a0
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x4dfd6a
test edi, edi
jl 0x4dfd6a
jle 0x4dfd5f
mov edx, dword [esi + 0x13c]
push 0
lea ecx, [esp + 0x18]
push ecx
push edi
push edx
push ebx
call ebp
test eax, eax
je 0x4dfd6a
cmp byte [esp + 0x13], 0
jne 0x4dfd6a
test edi, edi
jne 0x4dfd20
mov eax, dword [esi]
push eax
call fcn.004d4fc0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4dfd9a
lea ecx, [esp + 0x134]
push ecx
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x360], 1
je 0x4dfdab
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005dfbbe
add esp, 0x340
ret 0x10