Function at 0x40b090
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x44a9b6
mov eax, dword fs:[0]
push eax
sub esp, 0x414
mov eax, dword [0x462e60]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x462e60]
xor eax, esp
push eax
lea eax, [esp + 0x428]
mov dword fs:[0], eax
mov eax, dword [esp + 0x43c]
mov ebp, dword [esp + 0x438]
xor edi, edi
cmp eax, edi
mov ebx, ecx
mov dword [esp + 0x24], eax
je 0x40b53d
cmp dword [ebp + 0x104], edi
jbe 0x40b53d
mov eax, ebp
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], edi
mov byte [esp + 0x2c], 0
lea edx, [eax + 1]
jmp 0x40b110
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b110
sub eax, edx
push eax
push ebp
lea ecx, [esp + 0x30]
call fcn.00402080
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
lea esi, [ebx + 0x50]
push ecx
mov ecx, esi
mov dword [esp + 0x438], edi
call fcn.004089b0
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0x430], 0xffffffff
jb 0x40b160
mov edx, dword [esp + 0x2c]
push edx
call fcn.00415b52
add esp, 4
mov eax, dword [esi + 4]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x40b173
cmp eax, esi
je 0x40b17c
call fcn.00431767
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
cmp esi, dword [esp + 0x20]
je 0x40b2b9
cmp eax, edi
jne 0x40b197
call fcn.00431767
mov eax, dword [esp + 0x14]
cmp esi, dword [eax + 4]
jne 0x40b1a1
call fcn.00431767
mov ecx, dword [ebp + 0x104]
cmp ecx, dword [esi + 0x12c]
ja 0x40b248
lea ecx, [esp + 0x14]
call fcn.004016d0
mov edx, dword [eax + 0x11c]
mov esi, dword [ebp + 0x104]
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], edx
call fcn.004016d0
cmp dword [eax + 0x120], esi
jbe 0x40b3b4
push 0xff
lea eax, [esp + 0x49]
push edi
push eax
mov byte [esp + 0x50], 0
call fcn.00432700
mov ecx, dword [esp + 0x28]
add esi, ecx
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x144], esi
call fcn.004016d0
mov edx, dword [eax + 0x120]
sub edx, dword [ebp + 0x104]
lea eax, [esp + 0x44]
mov dword [esp + 0x148], edx
mov dword [esp + 0x14c], edi
mov dword [esp + 0x150], edi
mov dword [esp + 0x154], edi
mov dword [esp + 0x158], edi
push eax
jmp 0x40b3ad
push 0xff
lea ecx, [esp + 0x49]
push edi
push ecx
mov byte [esp + 0x50], 0
call fcn.00432700
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.004016d0
mov edx, dword [eax + 0x11c]
lea ecx, [esp + 0x14]
mov dword [esp + 0x144], edx
call fcn.004016d0
mov eax, dword [eax + 0x120]
lea ecx, [esp + 0x44]
push ecx
mov ecx, ebx
mov dword [esp + 0x14c], eax
mov dword [esp + 0x150], edi
mov dword [esp + 0x154], edi
mov dword [esp + 0x158], edi
mov dword [esp + 0x15c], edi
call fcn.0040a610
jmp 0x40b3c3
mov eax, dword [ebx + 0x58]
mov esi, dword [ebx]
cmp eax, esi
jb 0x40b31d
push 0x1ff
lea edx, [esp + 0x229]
push edi
push edx
mov byte [esp + 0x230], 0
call fcn.00432700
add esp, 0xc
cmp dword [ebx + 0x4c], 0x10
jb 0x40b2eb
mov ebx, dword [ebx + 0x38]
jmp 0x40b2ee
add ebx, 0x38
push esi
push ebp
push ebx
push 0x44d86c
lea eax, [esp + 0x234]
push 0x200
push eax
call fcn.0043264b
lea ecx, [esp + 0x23c]
push ecx
call fcn.0040eb60
add esp, 0x1c
jmp 0x40b53d
mov eax, dword [ebp + 0x104]
lea edx, [esp + 0x224]
push edx
push eax
mov ecx, ebx
call fcn.00409af0
test al, al
je 0x40b3c3
mov esi, dword [ebp + 0x104]
mov edi, dword [esp + 0x328]
cmp edi, esi
mov ecx, dword [esp + 0x324]
mov dword [esp + 0x1c], ecx
jbe 0x40b3b4
push 0xff
lea edx, [esp + 0x49]
push 0
push edx
mov byte [esp + 0x50], 0
call fcn.00432700
mov eax, dword [esp + 0x330]
add esp, 0xc
lea ecx, [esi + eax]
sub edi, esi
xor eax, eax
lea edx, [esp + 0x44]
mov dword [esp + 0x144], ecx
mov dword [esp + 0x148], edi
mov dword [esp + 0x14c], eax
mov dword [esp + 0x150], eax
mov dword [esp + 0x154], eax
mov dword [esp + 0x158], eax
push edx
mov ecx, ebx
call fcn.0040a610
mov eax, dword [ebx + 0x68]
sub eax, dword [ebp + 0x104]
cmp dword [esp + 0x1c], eax
jb 0x40b3d5
mov eax, dword [ebx + 0x68]
mov ecx, dword [ebp + 0x104]
add ecx, eax
mov dword [esp + 0x1c], eax
mov dword [ebx + 0x68], ecx
mov edx, dword [esp + 0x1c]
push ebp
mov dword [ebp + 0x100], edx
call fcn.004330e2
add esp, 4
push ebp
lea ecx, [esp + 0x2c]
call fcn.004026b0
lea eax, [esp + 0x28]
push eax
lea ecx, [ebx + 0x50]
mov dword [esp + 0x434], 1
call fcn.0040aad0
mov ecx, 0x46
mov esi, ebp
mov edi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0x430], 0xffffffff
jb 0x40b434
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00415b52
add esp, 4
mov edx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x14]
push 0
push edx
push eax
call fcn.004329db
add esp, 0xc
test eax, eax
je 0x40b4ab
mov edx, dword [0x44d85c]
mov eax, dword [0x44d860]
mov ecx, dword [str.fread]
push 0x52
mov dword [esp + 0x168], eax
mov dword [esp + 0x160], ecx
mov ecx, dword [0x44d864]
mov dword [esp + 0x164], edx
mov dx, word [0x44d868]
lea eax, [esp + 0x172]
push 0
push eax
mov dword [esp + 0x174], ecx
mov word [esp + 0x178], dx
call fcn.00432700
lea ecx, [esp + 0x168]
push ecx
jmp 0x40b535
mov edx, dword [ebx + 0x14]
mov eax, dword [ebp + 0x104]
mov ecx, dword [esp + 0x24]
push edx
push 1
push eax
push ecx
call fcn.00431d16
add esp, 0x10
cmp eax, 1
je 0x40b569
mov edx, dword [0x44d7dc]
mov eax, dword [0x44d7e0]
mov ecx, dword [0x44d7e4]
mov dword [esp + 0x15c], edx
mov edx, dword [0x44d7e8]
push 0x51
mov dword [esp + 0x16c], edx
mov dword [esp + 0x164], eax
mov ax, word [0x44d7ec]
mov dword [esp + 0x168], ecx
mov cl, byte [0x44d7ee]
lea edx, [esp + 0x173]
push 0
push edx
mov word [esp + 0x178], ax
mov byte [esp + 0x17a], cl
call fcn.00432700
lea eax, [esp + 0x168]
push eax
call fcn.0040eb60
add esp, 0x10
xor eax, eax
mov ecx, dword [esp + 0x428]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x410]
xor ecx, esp
call fcn.00431e6f
add esp, 0x420
ret 8
mov ecx, dword [ebx + 0x14]
push ecx
call fcn.004328f8
add esp, 4
test eax, eax
je 0x40b5e4
mov edx, dword [str.fflush]
mov eax, dword [0x44d7cc]
mov ecx, dword [0x44d7d0]
mov dword [esp + 0x1c0], edx
mov edx, dword [0x44d7d4]
push 0x51
mov dword [esp + 0x1d0], edx
mov dword [esp + 0x1c8], eax
mov ax, word [0x44d7d8]
mov dword [esp + 0x1cc], ecx
mov cl, byte [0x44d7da]
lea edx, [esp + 0x1d7]
push 0
push edx
mov word [esp + 0x1dc], ax
mov byte [esp + 0x1de], cl
call fcn.00432700
lea eax, [esp + 0x1cc]
jmp 0x40b534
mov eax, dword [ebp + 0x104]
jmp 0x40b53f