Function at 0x40e710
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4597e0
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x477c1c]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x477c1c]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
mov dword [esp + 0x64], edi
cmp dword [ebx + 0x44], edi
jne 0x40e77c
mov dword [esp + 0x64], 0xffffffff
cmp dword [esp + 0x84], 0x10
jb 0x40e76e
mov eax, dword [esp + 0x70]
push eax
call fcn.00421b49
add esp, 4
mov dword [esp + 0x80], edi
xor al, al
jmp 0x40e938
mov eax, dword [esp + 0x70]
mov ebp, 0x10
cmp dword [esp + 0x84], ebp
jae 0x40e792
lea eax, [esp + 0x70]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e7d7
mov dword [esp + 0x64], eax
cmp dword [esp + 0x84], ebp
jb 0x40e76e
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x80], edi
xor al, al
jmp 0x40e938
mov eax, dword [ebx + 0x40]
mov ebp, dword [ebx + 0x28]
push edi
mov dword [esp + 0x1c], edi
mov edx, dword [eax]
mov eax, dword [ebx + 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x28], edx
push 4
lea edx, [esp + 0x30]
push edx
push esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x38], eax
call edi
jmp 0x40e810
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x28]
test ebp, ebp
je 0x40e822
cmp ebp, eax
je 0x40e827
call fcn.004408d8
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x2c]
je 0x40e905
test ebp, ebp
jne 0x40e8fd
call fcn.004408d8
mov edx, dword [esp + 0x20]
cmp edx, dword [ebp + 0x18]
jne 0x40e850
call fcn.004408d8
mov eax, dword [esp + 0x20]
add eax, 0x10
push eax
lea ecx, [esp + 0x34]
call fcn.0040e680
mov byte [esp + 0x64], 1
mov ecx, dword [esp + 0x44]
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x2c], ecx
call edi
cmp dword [esp + 0x44], 0
je 0x40e89c
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x40e895
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x40e8ab
lea eax, [esp + 0x34]
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push esi
call edi
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea ecx, [esp + 0x5c]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x60]
push eax
push esi
call edi
mov byte [esp + 0x64], 0
lea ecx, [esp + 0x30]
call fcn.0040e480
lea ecx, [esp + 0x1c]
call fcn.0040e210
mov ebp, dword [esp + 0x1c]
jmp 0x40e810
mov ebp, dword [ebp]
jmp 0x40e842
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x64], 0xffffffff
cmp dword [esp + 0x84], 0x10
jb 0x40e92b
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00421b49
add esp, 4
mov dword [esp + 0x80], 0
mov al, 1
mov dword [esp + 0x84], 0xf
mov byte [esp + 0x70], 0
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0044014d
add esp, 0x54
ret 0x1c