Function at 0x40aa60
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3ec]
sub esp, 0x3ec
push 0xffffffffffffffff
push 0x44f528
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x469644]
xor eax, ebp
mov dword [ebp + 0x3e8], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x3f4]
xor edi, edi
push edi
push edi
push edi
push edi
push 1
mov dword [ebp - 0x34], ecx
push edi
lea ecx, [ebp - 0x48]
mov esi, edx
mov dword [ebp - 0x20], eax
call fcn.00421a23
mov dword [ebp - 4], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], edi
call fcn.0041c4e4
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40aade
push 0x80004005
call fcn.00401470
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
call fcn.0041c4e4
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40ab0b
push 0x80004005
call fcn.00401470
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
push edi
push 4
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 2
push 2
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x1c], 0x7d0
call fcn.00421265
push edi
push 4
lea edx, [ebp - 0x1c]
push edx
push 3
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x1c], 1
call fcn.00421265
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 3
mov esi, dword [esi]
push eax
push esi
mov dword [ebp - 0x28], edi
call fcn.0042201f
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x14]
push edi
push edi
push ecx
push edx
lea ecx, [ebp - 0x48]
call fcn.0042261c
push 0x20000000
push edi
push edi
push 1
mov ebx, eax
mov eax, dword [ebp - 0x18]
push edi
push eax
push 1
mov ecx, ebx
mov dword [ebp - 0x24], ebx
call fcn.004228e6
push edi
push edi
mov esi, eax
push edi
push edi
mov ecx, esi
mov dword [ebp - 0x2c], esi
call fcn.00421fa1
cmp eax, edi
jne 0x40abfe
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40abd2
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 - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aeb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40aeb9
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.004212f6
cmp dword [ebp - 0x50], 0xc8
push edi
jne 0x40adc8
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push 0x80
push 2
push edi
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x40aca3
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov ecx, esi
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
mov ecx, ebx
call edx
lea ecx, [ebp - 0x48]
call fcn.004220af
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ac77
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 - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aeb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40aeb9
push edi
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp]
push edx
push 5
mov ecx, esi
mov dword [ebp - 0x54], 0x3e8
call fcn.004212d8
lea eax, [ebp]
push eax
call fcn.00436dad
mov ecx, dword [ebp - 0x34]
add esp, 4
push eax
push 4
push 0x5f6
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x2800
call fcn.00416615
mov ebx, eax
add esp, 4
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov edx, dword [esi]
mov eax, dword [edx + 0x34]
push 0x2800
push ebx
mov ecx, esi
call eax
mov edi, eax
test edi, edi
jbe 0x40ad33
mov ecx, dword [ebp - 0x34]
push edi
push 1
push 0x5f6
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x1c]
push 0
lea edx, [ebp - 0x30]
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x30]
add dword [ebp - 0x20], ecx
jmp 0x40acf2
push ebx
call fcn.00416620
mov ecx, dword [ebp - 0x1c]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 2
mov edx, dword [esi]
mov eax, dword [edx + 0x4c]
mov ecx, esi
call eax
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40ad64
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
lea ecx, [ebp - 0x48]
call fcn.004220af
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad8f
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 - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40adb2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 0xffffffff
call fcn.004221b3
mov al, 1
jmp 0x40aeca
call fcn.00416620
add esp, 4
mov dword [ebp - 0x28], edi
cmp esi, edi
je 0x40adee
mov edx, dword [esi]
mov eax, dword [edx + 0x4c]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 1
mov ecx, esi
call eax
mov dword [ebp - 0x2c], edi
cmp ebx, edi
je 0x40ae09
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push 1
mov ecx, ebx
call eax
mov dword [ebp - 0x24], edi
lea ecx, [ebp - 0x48]
call fcn.004220af
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ae34
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 - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aeb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40aeb9
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 0xffffffff
call fcn.004221b3
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3e8]
xor ecx, ebp
call fcn.004366ef
add ebp, 0x3ec
mov esp, ebp
pop ebp
ret