Function at 0x40b270
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x452ef8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x46f7c0]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46f7c0]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x50]
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40b2b4
xor eax, eax
jmp 0x40b476
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x40b2dd
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x40b2dd
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x40b476
cmp dword [esi + 0x54], 0
je 0x40b473
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x40b305
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x40]
mov dword [ecx], edx
mov ecx, dword [esi + 0x20]
mov dword [ecx], eax
mov edx, dword [esi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [esi + 0x44], 0
jne 0x40b32b
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.0043ccde
add esp, 8
cmp eax, 0xffffffff
je 0x40b473
mov eax, ebx
jmp 0x40b476
mov ecx, 0xf
xor eax, eax
mov byte [esp + 0x20], 0
mov byte [esp + 0x14], bl
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
cmp ecx, 0x10
jae 0x40b358
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
lea ebx, [esi + 0x4c]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x34]
mov edx, eax
cmp ebp, 0x10
jae 0x40b37c
lea edx, [esp + 0x20]
mov eax, edx
add edx, dword [esp + 0x30]
mov ecx, dword [esi + 0x44]
mov edi, dword [ecx]
lea ebp, [esp + 0x18]
push ebp
push edx
push eax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x25]
push eax
mov eax, dword [edi + 0x14]
lea edx, [esp + 0x28]
push edx
push ebx
call eax
test eax, eax
js 0x40b46a
cmp eax, 1
jg 0x40b420
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, eax
cmp ebp, 0x10
jae 0x40b3c1
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, ecx
je 0x40b3f2
cmp ebp, 0x10
jae 0x40b3d2
lea eax, [esp + 0x20]
mov ecx, dword [esi + 0x54]
push ecx
push edi
push 1
push eax
call fcn.0043d50e
add esp, 0x10
cmp edi, eax
jne 0x40b46a
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
mov byte [esi + 0x49], 1
cmp dword [esp + 0x1c], edx
jne 0x40b45b
test edi, edi
jne 0x40b36f
cmp dword [esp + 0x30], 0x20
lea ecx, [esp + 0x20]
jae 0x40b46e
push edi
push 8
call fcn.0040a650
jmp 0x40b367
cmp eax, 3
jne 0x40b46a
mov eax, dword [esi + 0x54]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0040a160
add esp, 8
test al, al
je 0x40b44b
mov esi, dword [esp + 0x50]
lea ecx, [esp + 0x20]
call fcn.00404480
mov eax, esi
jmp 0x40b476
lea ecx, [esp + 0x20]
or esi, 0xffffffff
call fcn.00404480
mov eax, esi
jmp 0x40b476
lea ecx, [esp + 0x20]
call fcn.00404480
mov eax, dword [esp + 0x50]
jmp 0x40b476
lea ecx, [esp + 0x20]
call fcn.00404480
or eax, 0xffffffff
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0043b8c7
add esp, 0x38
ret 4