Function at 0x4015f0
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3ec]
sub esp, 0x3ec
push 0xffffffffffffffff
push 0x4244f8
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x42dc00]
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 ebx, ebx
push ebx
push ebx
push ebx
push ebx
push 1
mov dword [ebp - 0x48], ecx
push ebx
lea ecx, [ebp - 0x40]
mov esi, edx
mov dword [ebp - 0x50], eax
call fcn.00403222
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
call fcn.0040592b
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40166e
push 0x80004005
call fcn.00402050
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.0040592b
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40169b
push 0x80004005
call fcn.00402050
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
push ebx
push 4
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 2
push 2
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x1c], 0x7d0
call fcn.004029d4
push ebx
push 4
lea edx, [ebp - 0x1c]
push edx
push 3
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x1c], 1
call fcn.004029d4
lea eax, [ebp - 0x44]
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], ebx
call fcn.00403813
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x14]
push ebx
push ebx
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00403cd2
push 0x20000000
push ebx
push ebx
push 1
mov edi, eax
mov eax, dword [ebp - 0x18]
push ebx
push eax
push 1
mov ecx, edi
mov dword [ebp - 0x20], edi
call fcn.00403d89
push ebx
push ebx
mov esi, eax
push ebx
push ebx
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.00403782
cmp eax, ebx
jne 0x40178e
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 0x401762
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 0x401a52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401a52
lea ecx, [ebp - 0x54]
push ecx
mov ecx, esi
call fcn.00402a5d
cmp dword [ebp - 0x54], 0xc8
push ebx
jne 0x401961
mov edx, dword [ebp - 0x50]
mov eax, dword [edx]
push 0x80
push 2
push ebx
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x401833
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov ecx, esi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
lea ecx, [ebp - 0x40]
call fcn.004038a1
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 0x401807
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 0x401a52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401a52
push ebx
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp]
push edx
push 5
mov ecx, esi
mov dword [ebp - 0x4c], 0x3e8
call fcn.00402a41
lea eax, [ebp]
push eax
call fcn.0040fa48
push 0x2800
call fcn.004027f3
mov edx, dword [esi]
add esp, 8
mov edi, eax
mov eax, dword [edx + 0x34]
push 0x2800
push edi
mov ecx, esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], 0
call eax
lea ecx, [ecx]
test eax, eax
jbe 0x4018aa
mov edx, dword [ebp - 0x1c]
push 0
lea ecx, [ebp - 0x2c]
push ecx
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
add ebx, dword [ebp - 0x2c]
push 0x2800
push edi
mov ecx, esi
call edx
jmp 0x401880
test edi, edi
jne 0x4018b2
xor eax, eax
jmp 0x4018c2
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4018b7
sub eax, edx
mov ecx, dword [ebp - 0x48]
push eax
push edi
call fcn.00402240
push edi
call fcn.004027ee
mov eax, dword [ebp - 0x1c]
add esp, 4
push eax
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 - 0x20]
test ecx, ecx
je 0x4018fd
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
lea ecx, [ebp - 0x40]
call fcn.004038a1
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 0x401928
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 0x40194b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.00403975
mov al, 1
jmp 0x401a63
call fcn.004027ee
add esp, 4
cmp esi, ebx
mov dword [ebp - 0x28], ebx
je 0x401987
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 - 0x24], ebx
cmp edi, ebx
je 0x4019a2
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
mov edx, dword [edi]
mov eax, dword [edx + 4]
push 1
mov ecx, edi
call eax
mov dword [ebp - 0x20], ebx
lea ecx, [ebp - 0x40]
call fcn.004038a1
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 0x4019cd
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 0x401a52
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401a52
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.00403975
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.0040f839
add ebp, 0x3ec
mov esp, ebp
pop ebp
ret