Function at 0x40e200
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42347a
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x42d4d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x134], eax
mov edi, edx
push 8
lea ecx, [edi + 0x7c]
push 0
push ecx
mov dword [ebp - 4], 0
call fcn.00416573
mov edx, dword [section..data]
mov dword [ebp - 0x138], eax
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x130], eax
mov byte [ebp - 4], 1
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
lea ebx, [edi + 1]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x12c], edi
mov byte [ebp - 4], 2
test ebx, ebx
je 0x40e2c1
test ebx, 0xffff0000
jne 0x40e2c1
movzx ebx, bx
push ebx
call fcn.004039a0
add esp, 4
test eax, eax
je 0x40e2d2
push eax
mov eax, ebx
lea edi, [ebp - 0x12c]
call fcn.004020e0
jmp 0x40e2cc
lea eax, [ebp - 0x12c]
call fcn.0040d3a0
mov edi, dword [ebp - 0x12c]
lea ecx, [ebp - 0x130]
push ecx
push ecx
lea eax, [edi - 0x10]
mov dword [ebp - 0x13c], esp
mov byte [ebp - 4], 3
mov ebx, esp
mov dword [ebp - 0x13c], eax
call fcn.00403820
add eax, 0x10
lea edx, [ebp + 0xc]
mov dword [ebx], eax
push edx
lea eax, [ebp - 0x140]
push eax
push esi
call fcn.0040de40
mov byte [ebp - 4], 4
mov ecx, dword [eax]
mov ebx, dword [ebp + 0xc]
lea eax, [ecx - 0x10]
add ebx, 0xfffffff0
cmp eax, ebx
je 0x40e368
cmp dword [ebx + 0xc], 0
jl 0x40e35b
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x40e35b
call fcn.00403820
mov dword [ebp - 0x128], eax
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40e34d
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov ecx, dword [ebp - 0x128]
add ecx, 0x10
mov dword [ebp + 0xc], ecx
jmp 0x40e368
mov ebx, dword [ecx - 0xc]
push ecx
lea edx, [ebp + 0xc]
push edx
call fcn.00402880
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x140]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e38e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
call fcn.00403820
lea ebx, [eax + 0x10]
mov dword [ebp - 0x128], ebx
mov byte [ebp - 4], 5
cmp dword [ebx - 4], 1
jle 0x40e3c2
mov ecx, dword [ebx - 0xc]
push ecx
lea edx, [ebp - 0x128]
push edx
call fcn.00402c40
mov ebx, dword [ebp - 0x128]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [ebx - 8]
push eax
push ebx
call fcn.00415e4f
add esp, 8
test eax, eax
js 0x40e662
cmp eax, dword [ebx - 8]
jg 0x40e662
xor ecx, ecx
mov dword [ebx - 0xc], eax
push 1
lea edx, [ebp - 0x128]
mov word [ebx + eax*2], cx
push edx
mov ecx, esi
call fcn.0040e670
mov eax, dword [edi - 0xc]
mov esi, dword [ebp - 0x130]
cmp eax, dword [esi - 0xc]
jne 0x40e4db
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e43c
test dx, dx
je 0x40e438
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e43c
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e416
xor eax, eax
jmp 0x40e441
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x40e4db
push 3
push esi
lea ecx, [ebp - 0x98]
lea eax, [ebp - 0x94]
push ecx
mov dword [ebp - 0x98], eax
call fcn.00401bb0
push 3
push edi
lea eax, [ebp - 0x120]
lea edx, [ebp - 0x11c]
mov byte [ebp - 4], 6
push eax
mov dword [ebp - 0x120], edx
call fcn.00401bb0
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0x120]
mov eax, dword [ebp - 0x134]
mov ebx, dword [esi - 0xc]
push ecx
push edx
push eax
call fcn.00406250
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x11c]
cmp eax, ecx
je 0x40e4be
push eax
call fcn.004157cc
add esp, 4
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x98]
lea edx, [ebp - 0x94]
cmp eax, edx
je 0x40e4db
push eax
call fcn.004157cc
add esp, 4
mov esi, dword [ebp - 0x138]
lea eax, [esi + 1]
push eax
call fcn.00414b8b
mov ecx, dword [ebp + 0xc]
add esp, 4
xor edi, edi
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
push ecx
mov ebx, eax
mov byte [ebp - 0x121], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40e65b
call fcn.00409de0
test eax, eax
jne 0x40e52b
mov byte [ebp - 0x121], 1
push esi
mov esi, dword [ebp - 0x134]
push ebx
call fcn.00406160
mov edx, dword [ebp - 0x138]
cmp eax, edx
jne 0x40e59d
cmp byte [ebp - 0x121], 0
je 0x40e59d
cmp byte [ebp + 0x10], 0
je 0x40e582
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x40e582
mov eax, dword [ebx + 0x3c]
add eax, ebx
add eax, 0x98
je 0x40e582
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40e582
cmp dword [eax], 0
je 0x40e582
sub edx, ecx
mov dword [eax + 4], 0
mov dword [eax], 0
push 0
lea ecx, [ebp - 0x140]
push ecx
push edx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40e59d
call fcn.00409de0
test edi, edi
je 0x40e5a8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x128]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e5ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x13c]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e5f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x130]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e617
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e63d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041528c
mov esp, ebp
pop ebp
ret 0xc
mov edi, eax
jmp 0x40e524
push 0x80070057
call fcn.00403bc0
int3