Function at 0x40ea40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x437c
call fcn.00412d50
push ebx
push esi
mov dword [ebp - 0x4378], ecx
cmp dword [ebp + 0x14], 3
je 0x40ea71
cmp dword [ebp + 0x14], 2
je 0x40ea71
cmp dword [ebp + 0x14], 1
je 0x40ea71
mov eax, 0x10000
jmp 0x40ef90
cmp dword [ebp + 0x14], 3
jne 0x40ebbc
mov eax, dword [ebp - 0x4378]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x40eb3f
mov edx, dword [ebp - 0x4378]
cmp dword [edx + 4], 0xffffffff
je 0x40eaaa
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040dd60
add esp, 4
mov edx, dword [ebp - 0x4378]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x40ead1
mov eax, 0x10000
jmp 0x40ef90
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x40eaf2
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d100
add esp, 4
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x40eb15
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
push eax
call fcn.0040d170
add esp, 4
jmp 0x40eaf2
mov ecx, dword [ebp - 0x4378]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d5a0
add esp, 8
mov edx, dword [ebp - 0x4378]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d830
add esp, 0xc
mov dword [ebp - 0x4144], eax
cmp dword [ebp - 0x4144], 0
jle 0x40eb71
mov eax, 0x600
jmp 0x40ef90
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
push eax
call fcn.0040dd60
add esp, 4
mov ecx, dword [ebp - 0x4378]
mov dword [ecx + 4], 0xffffffff
cmp dword [ebp - 0x4144], 0
jne 0x40eb9f
xor eax, eax
jmp 0x40ef90
cmp dword [ebp - 0x4144], 0xffffff96
jne 0x40ebb2
mov eax, 0x1000
jmp 0x40ef90
mov eax, 0x5000000
jmp 0x40ef90
mov edx, dword [ebp - 0x4378]
cmp dword [edx + 4], 0xffffffff
je 0x40ebd9
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040dd60
add esp, 4
mov edx, dword [ebp - 0x4378]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x40ec00
mov eax, 0x10000
jmp 0x40ef90
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x40ec21
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d100
add esp, 4
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x40ec44
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
push eax
call fcn.0040d170
add esp, 4
jmp 0x40ec21
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x4378]
call fcn.0040e130
mov eax, dword [ebp - 0x30]
and eax, 0x10
je 0x40ec92
cmp dword [ebp + 0x14], 1
jne 0x40ec6f
xor eax, eax
jmp 0x40ef90
lea ecx, [ebp - 0x134]
push ecx
mov edx, dword [ebp - 0x4378]
add edx, 0x13c
push edx
call fcn.0040e930
add esp, 8
xor eax, eax
jmp 0x40ef90
cmp dword [ebp + 0x14], 1
jne 0x40eca3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jmp 0x40ee5f
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4148], ecx
mov edx, dword [ebp - 0x4378]
add edx, 0x13c
push edx
lea eax, [ebp - 0x4258]
push eax
call fcn.00413400
add esp, 8
mov ecx, dword [ebp - 0x4148]
push ecx
lea edx, [ebp - 0x4258]
push edx
call fcn.00413410
add esp, 8
lea eax, [ebp - 0x4258]
mov dword [ebp - 0x414c], eax
mov ecx, dword [ebp - 0x414c]
mov dword [ebp - 0x425c], ecx
mov edx, dword [ebp - 0x425c]
movsx eax, byte [edx]
test eax, eax
je 0x40ed3f
mov ecx, dword [ebp - 0x425c]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x40ed1f
mov eax, dword [ebp - 0x425c]
movsx ecx, byte [eax]
cmp ecx, 0x5c
jne 0x40ed2e
mov edx, dword [ebp - 0x425c]
add edx, 1
mov dword [ebp - 0x414c], edx
mov eax, dword [ebp - 0x425c]
add eax, 1
mov dword [ebp - 0x425c], eax
jmp 0x40ecf6
mov ecx, dword [ebp - 0x414c]
lea edx, [ebp - 0x4258]
cmp ecx, edx
je 0x40ee3e
lea eax, [ebp - 0x4258]
push eax
lea ecx, [ebp - 0x4368]
push ecx
call fcn.00413400
add esp, 8
mov edx, dword [ebp - 0x414c]
lea eax, [ebp - 0x4258]
sub edx, eax
mov byte [ebp + edx - 0x4369], 0
movsx ecx, byte [ebp - 0x4368]
test ecx, ecx
je 0x40edba
movsx edx, byte [ebp - 0x4368]
cmp edx, 0x2f
je 0x40edba
movsx eax, byte [ebp - 0x4368]
cmp eax, 0x5c
je 0x40edba
movsx ecx, byte [ebp - 0x4367]
cmp ecx, 0x3a
je 0x40edba
mov dword [ebp - 0x437c], 0
jmp 0x40edc4
mov dword [ebp - 0x437c], 1
mov dl, byte [ebp - 0x437c]
mov byte [ebp - 0x425d], dl
movzx ebx, byte [ebp - 0x425d]
push 0x42c4a0
lea eax, [ebp - 0x4368]
push eax
call fcn.0040f700
add esp, 8
mov esi, eax
neg esi
sbb esi, esi
neg esi
push 0x42c4a4
lea ecx, [ebp - 0x4368]
push ecx
call fcn.0040f700
add esp, 8
neg eax
sbb eax, eax
neg eax
or esi, eax
or ebx, esi
mov byte [ebp - 0x425d], bl
movzx edx, byte [ebp - 0x425d]
test edx, edx
jne 0x40ee3e
lea eax, [ebp - 0x4368]
push eax
mov ecx, dword [ebp - 0x4378]
add ecx, 0x13c
push ecx
call fcn.0040e930
add esp, 8
push 0
mov edx, dword [ebp - 0x30]
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x4258]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40ee6f
mov eax, 0x200
jmp 0x40ef90
mov ecx, dword [ebp - 0x4378]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d5a0
add esp, 8
mov dword [ebp - 0x13c], 0
cmp dword [ebp - 0x13c], 0
jne 0x40ef3d
push 0x4000
lea edx, [ebp - 0x4140]
push edx
mov eax, dword [ebp - 0x4378]
mov ecx, dword [eax]
push ecx
call fcn.0040d830
add esp, 0xc
mov dword [ebp - 0x436c], eax
cmp dword [ebp - 0x436c], 0xffffff96
jne 0x40eedc
mov dword [ebp - 0x13c], 0x1000
jmp 0x40ef3d
cmp dword [ebp - 0x436c], 0
jge 0x40eef1
mov dword [ebp - 0x13c], 0x5000000
jmp 0x40ef3d
cmp dword [ebp - 0x436c], 0
jne 0x40eefc
jmp 0x40ef3d
push 0
lea edx, [ebp - 0x4374]
push edx
mov eax, dword [ebp - 0x436c]
push eax
lea ecx, [ebp - 0x4140]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x4370], eax
cmp dword [ebp - 0x4370], 0
jne 0x40ef38
mov dword [ebp - 0x13c], 0x400
jmp 0x40ef3d
jmp 0x40ee97
cmp dword [ebp - 0x13c], 0
jne 0x40ef5c
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x40ef6c
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x4378]
mov eax, dword [edx]
push eax
call fcn.0040dd60
add esp, 4
cmp dword [ebp - 0x13c], 0
je 0x40ef8e
mov eax, dword [ebp - 0x13c]
jmp 0x40ef90
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10