Function at 0x40b010
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46fa18
mov eax, dword fs:[0]
push eax
sub esp, 0x1e0
push ebx
push esi
push edi
mov eax, dword [0x4a2a04]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x40]
mov dword [ebp - 0x38], eax
mov esi, 1
xor edi, edi
mov dword [ebp - 4], esi
cmp dword [ebp + 0x1c], edi
jbe 0x40b1f4
cmp dword [ebp + 0x38], edi
jbe 0x40b1f4
push edi
push edi
push edi
push edi
push esi
push 0x47f7f4
lea ecx, [ebp - 0x4c]
call fcn.00445b4b
mov byte [ebp - 4], 2
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
call fcn.0044502c
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40b096
push 0x80004005
call fcn.00406e20
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
call fcn.0044502c
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40b0c3
push 0x80004005
call fcn.00406e20
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
push edi
push 4
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 4
push 2
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x1c], 0x7d0
call fcn.00445308
push edi
push 4
lea edx, [ebp - 0x1c]
push edx
push 3
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x1c], esi
call fcn.00445308
mov byte [ebp - 4], 5
cmp dword [ebp + 0x20], 0x10
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], edi
jae 0x40b115
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x28]
call fcn.00406f90
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.00446122
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x18]
push edi
push edi
push edx
push eax
lea ecx, [ebp - 0x4c]
call fcn.00446638
mov ecx, dword [ebp - 0x14]
push 0xa0000000
push edi
push edi
push esi
push edi
mov ebx, eax
push ecx
push esi
mov ecx, ebx
mov dword [ebp - 0x20], ebx
call fcn.004466ef
push edi
push edi
mov esi, eax
push edi
push edi
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.004460d6
cmp eax, edi
jne 0x40b23f
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b1a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
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 0x40b1c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
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 0x40b1e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.004462d1
mov esi, 0x10
cmp dword [ebp + 0x20], esi
jb 0x40b20a
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00444c3b
add esp, 4
mov byte [ebp + 0xc], 0
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x20], 0xf
cmp dword [ebp + 0x3c], esi
jb 0x40b229
mov edx, dword [ebp + 0x28]
push edx
call fcn.00444c3b
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x3c
lea eax, [ebp - 0x5c]
push eax
mov ecx, esi
call fcn.00445380
cmp dword [ebp - 0x5c], 0xc8
jne 0x40b57b
cmp dword [ebp + 0x3c], 0x10
mov eax, dword [ebp + 0x28]
jae 0x40b263
lea eax, [ebp + 0x28]
push 3
lea ecx, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1ec]
mov dword [ebp - 0x1ec], ecx
call fcn.0040b6a0
mov edx, dword [ebp - 0x1ec]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov eax, dword [ebp - 0x1ec]
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1c], edi
cmp eax, ecx
je 0x40b2ba
push eax
call fcn.004521fa
add esp, 4
cmp edi, 0xffffffff
jne 0x40b33e
test esi, esi
je 0x40b2de
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], 0
test ebx, ebx
je 0x40b2fd
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 - 0x20], 0
lea ecx, [ebp - 0x4c]
call fcn.004461b2
lea ecx, [ebp - 0x28]
call fcn.00406a70
lea ecx, [ebp - 0x14]
call fcn.00406a70
lea ecx, [ebp - 0x18]
call fcn.00406a70
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.004462d1
lea ecx, [ebp + 8]
call fcn.00406830
lea ecx, [ebp + 0x24]
call fcn.00406830
jmp 0x40b229
lea ecx, [ebp - 0x2c]
call fcn.00406a40
xor edi, edi
push edi
lea ecx, [ebp - 0x2c]
push ecx
push 5
mov ecx, esi
mov byte [ebp - 4], 7
call fcn.00446248
mov eax, dword [ebp - 0x2c]
push 3
lea edx, [ebp - 0xe4]
push eax
lea eax, [ebp - 0xe8]
mov dword [ebp - 0xe8], edx
call fcn.00407690
mov ecx, dword [ebp - 0xe8]
push ecx
call fcn.004523d8
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0xe8]
lea edx, [ebp - 0xe4]
add esp, 4
cmp eax, edx
je 0x40b3a2
push eax
call fcn.004521fa
add esp, 4
push 0x400
call fcn.00444c30
add esp, 4
mov ebx, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push 0x400
push ebx
mov ecx, esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x58], edi
call edx
mov edi, eax
test edi, edi
jbe 0x40b443
mov ecx, dword [ebp - 0x1c]
push 0
lea eax, [ebp - 0x58]
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [ebp - 0x30], edi
cmp dword [ebp - 0x38], 0
je 0x40b432
mov eax, dword [ebp - 0x60]
test eax, eax
jbe 0x40b432
fldz
mov edi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx]
sub esp, 0x20
fst qword [esp + 0x18]
fstp qword [esp + 0x10]
fild dword [ebp - 0x30]
test edi, edi
jge 0x40b413
fadd qword [0x47f838]
mov dword [ebp - 0x54], eax
fstp qword [esp + 8]
fild dword [ebp - 0x54]
test eax, eax
jge 0x40b427
fadd qword [0x47f838]
mov eax, dword [edx + 0x88]
fstp qword [esp]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x34]
push 0x400
push ebx
mov ecx, esi
call eax
jmp 0x40b3c9
push ebx
call fcn.00444c3b
mov ecx, dword [ebp - 0x1c]
add esp, 4
xor edi, edi
push ecx
mov dword [ebp - 0x34], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 esi, dword [ebp - 0x20]
mov dword [ebp - 0x24], edi
cmp esi, edi
je 0x40b490
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 1
mov ecx, esi
call eax
mov dword [ebp - 0x20], edi
lea ecx, [ebp - 0x4c]
call fcn.004461b2
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
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 0x40b501
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
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 0x40b524
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.004462d1
mov esi, 0x10
cmp dword [ebp + 0x20], esi
jb 0x40b546
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00444c3b
add esp, 4
mov dword [ebp + 0x20], 0xf
mov dword [ebp + 0x1c], edi
mov byte [ebp + 0xc], 0
cmp dword [ebp + 0x3c], esi
jb 0x40b565
mov edx, dword [ebp + 0x28]
push edx
call fcn.00444c3b
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x3c
cmp esi, edi
je 0x40b596
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 1
mov ecx, esi
call edx
mov dword [ebp - 0x24], edi
cmp ebx, edi
je 0x40b5b1
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 1
mov ecx, ebx
call edx
mov dword [ebp - 0x20], edi
lea ecx, [ebp - 0x4c]
call fcn.004461b2
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b5dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
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 0x40b5ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
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 0x40b622
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.004462d1
lea ecx, [ebp + 8]
call fcn.00406830
lea ecx, [ebp + 0x24]
call fcn.00406830
jmp 0x40b229