Function at 0x40d930
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3bc
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x3bc]
mov ecx, 0xef
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 4], ecx
cmp dword [ebp + 0x14], 3
je 0x40d96f
cmp dword [ebp + 0x14], 2
je 0x40d96f
cmp dword [ebp + 0x14], 1
je 0x40d96f
mov eax, 0x10000
jmp 0x40df60
cmp dword [ebp + 0x14], 3
jne 0x40da91
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x40da19
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0xffffffff
je 0x40d99f
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004011f9
add esp, 4
mov edx, dword [ebp - 4]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x40d9c0
mov eax, 0x10000
jmp 0x40df60
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x40d9db
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004011bd
add esp, 4
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x40d9f8
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.0040135c
add esp, 4
jmp 0x40d9db
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.0040126c
add esp, 8
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.00401136
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jg 0x40da54
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004011f9
add esp, 4
mov edx, dword [ebp - 4]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 8]
and eax, 0xff
test eax, eax
je 0x40da67
xor eax, eax
jmp 0x40df60
cmp dword [ebp - 0xc], 0
jle 0x40da77
mov eax, 0x600
jmp 0x40df60
cmp dword [ebp - 0xc], 0xffffff96
jne 0x40da87
mov eax, 0x1000
jmp 0x40df60
mov eax, 0x5000000
jmp 0x40df60
mov ecx, dword [ebp - 4]
cmp dword [ecx + 4], 0xffffffff
je 0x40daa8
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.004011f9
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x40dac9
mov eax, 0x10000
jmp 0x40df60
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x40dae4
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.004011bd
add esp, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x40db01
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.0040135c
add esp, 4
jmp 0x40dae4
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 4]
call fcn.004013bb
mov edx, dword [ebp - 0x30]
and edx, 0x10
test edx, edx
je 0x40dbd5
cmp dword [ebp + 0x14], 1
jne 0x40db2f
xor eax, eax
jmp 0x40df60
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0x13c]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x40db7c
mov eax, dword [ebp - 0x13c]
movsx ecx, byte [eax]
cmp ecx, 0x5c
je 0x40db7c
mov edx, dword [ebp - 0x13c]
movsx eax, byte [edx]
test eax, eax
je 0x40db70
mov ecx, dword [ebp - 0x13c]
movsx edx, byte [ecx + 1]
cmp edx, 0x3a
je 0x40db7c
mov dword [ebp - 0x378], 0
jmp 0x40db86
mov dword [ebp - 0x378], 1
mov al, byte [ebp - 0x378]
mov byte [ebp - 0x140], al
mov ecx, dword [ebp - 0x140]
and ecx, 0xff
test ecx, ecx
je 0x40dbb5
mov edx, dword [ebp - 0x13c]
push edx
push 0
call fcn.0040113b
add esp, 8
jmp 0x40dbce
mov eax, dword [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x140
push ecx
call fcn.0040113b
add esp, 8
xor eax, eax
jmp 0x40df60
cmp dword [ebp + 0x14], 1
jne 0x40dbe9
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x144], edx
jmp 0x40ddae
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x148], eax
mov ecx, dword [ebp - 0x148]
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x14c]
mov dword [ebp - 0x150], edx
mov eax, dword [ebp - 0x150]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40dc53
mov edx, dword [ebp - 0x150]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x40dc33
mov ecx, dword [ebp - 0x150]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x40dc42
mov eax, dword [ebp - 0x150]
add eax, 1
mov dword [ebp - 0x14c], eax
mov ecx, dword [ebp - 0x150]
add ecx, 1
mov dword [ebp - 0x150], ecx
jmp 0x40dc0a
mov edx, dword [ebp - 0x148]
push edx
lea eax, [ebp - 0x254]
push eax
call fcn.0041aa40
add esp, 8
mov ecx, dword [ebp - 0x14c]
cmp ecx, dword [ebp - 0x148]
jne 0x40dc80
mov byte [ebp - 0x254], 0
jmp 0x40dc94
mov edx, dword [ebp - 0x14c]
sub edx, dword [ebp - 0x148]
mov byte [ebp + edx - 0x254], 0
movsx eax, byte [ebp - 0x254]
cmp eax, 0x2f
je 0x40dccf
movsx ecx, byte [ebp - 0x254]
cmp ecx, 0x5c
je 0x40dccf
movsx edx, byte [ebp - 0x254]
test edx, edx
je 0x40dcc3
movsx eax, byte [ebp - 0x253]
cmp eax, 0x3a
je 0x40dccf
mov dword [ebp - 0x37c], 0
jmp 0x40dcd9
mov dword [ebp - 0x37c], 1
mov cl, byte [ebp - 0x37c]
mov byte [ebp - 0x35c], cl
mov edx, dword [ebp - 0x35c]
and edx, 0xff
test edx, edx
je 0x40dd34
mov esi, esp
mov eax, dword [ebp - 0x14c]
push eax
lea ecx, [ebp - 0x254]
push ecx
push str._s_s
lea edx, [ebp - 0x358]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp esi, esp
call fcn.00419880
lea eax, [ebp - 0x254]
push eax
push 0
call fcn.0040113b
add esp, 8
jmp 0x40dd81
mov esi, esp
mov ecx, dword [ebp - 0x14c]
push ecx
lea edx, [ebp - 0x254]
push edx
mov eax, dword [ebp - 4]
add eax, 0x140
push eax
push str._s_s_s
lea ecx, [ebp - 0x358]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
cmp esi, esp
call fcn.00419880
lea edx, [ebp - 0x254]
push edx
mov eax, dword [ebp - 4]
add eax, 0x140
push eax
call fcn.0040113b
add esp, 8
mov esi, esp
push 0
mov ecx, dword [ebp - 0x30]
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x358]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp esi, esp
call fcn.00419880
mov dword [ebp - 0x144], eax
cmp dword [ebp - 0x144], 0xffffffff
jne 0x40ddc1
mov eax, 0x200
jmp 0x40df60
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x138]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.0040126c
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x13c], 0
jne 0x40de07
push 0x4000
call fcn.0041a0b0
add esp, 4
mov dword [ebp - 0x374], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x374]
mov dword [edx + 0x13c], eax
mov dword [ebp - 0x360], 0
cmp dword [ebp - 0x360], 0
jne 0x40def8
lea ecx, [ebp - 0x364]
push ecx
push 0x4000
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x13c]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.00401136
add esp, 0x10
mov dword [ebp - 0x368], eax
cmp dword [ebp - 0x368], 0xffffff96
jne 0x40de60
mov dword [ebp - 0x360], 0x1000
jmp 0x40def8
cmp dword [ebp - 0x368], 0
jge 0x40de78
mov dword [ebp - 0x360], 0x5000000
jmp 0x40def8
cmp dword [ebp - 0x368], 0
jle 0x40decc
mov esi, esp
push 0
lea eax, [ebp - 0x36c]
push eax
mov ecx, dword [ebp - 0x368]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x13c]
push eax
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.00419880
mov dword [ebp - 0x370], eax
cmp dword [ebp - 0x370], 0
jne 0x40decc
mov dword [ebp - 0x360], 0x400
jmp 0x40def8
mov edx, dword [ebp - 0x364]
and edx, 0xff
test edx, edx
je 0x40dede
jmp 0x40def8
cmp dword [ebp - 0x368], 0
jne 0x40def3
mov dword [ebp - 0x360], 0x5000000
jmp 0x40def8
jmp 0x40de11
cmp dword [ebp - 0x360], 0
jne 0x40df23
mov esi, esp
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, esp
call fcn.00419880
cmp dword [ebp + 0x14], 1
je 0x40df3f
mov esi, esp
mov ecx, dword [ebp - 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00419880
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.004011f9
add esp, 4
cmp dword [ebp - 0x360], 0
je 0x40df5e
mov eax, dword [ebp - 0x360]
jmp 0x40df60
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x3bc
cmp ebp, esp
call fcn.00419880
mov esp, ebp
pop ebp
ret 0x10