Function at 0x40a3e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
test esi, esi
jne 0x40a3fb
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a400
sub eax, edx
je 0x40a3f1
cmp dword [ebx + 0x364], 0
je 0x40a3f1
push 0x5c
push 1
push esi
mov ecx, ebx
call fcn.004085b0
test al, al
je 0x40a3f1
push edi
push 0x469844
push esi
call fcn.00438800
mov edi, eax
add esp, 8
mov dword [ebp - 0xc], edi
test edi, edi
je 0x40a881
cmp dword [ebx + 0x398], 0
jne 0x40a45d
push 0
push 0x46daf4
mov ecx, ebx
call fcn.00405df0
mov dword [ebx + 0x398], eax
mov edx, dword [ebx + 0x398]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a468
sub eax, esi
push edi
mov esi, eax
push esi
push 1
push edx
call fcn.0043a5a0
add esp, 0x10
push edi
cmp eax, esi
jne 0x40a879
push 1
push 1
push 0x46dc0c
call fcn.0043a5a0
add esp, 0x10
cmp eax, 1
jne 0x40a878
mov eax, dword [ebx + 0x360]
mov ecx, dword [eax]
mov esi, dword [ecx + 0xc]
lea edx, [esi*4]
push edx
mov dword [ebp - 8], esi
call fcn.00436a77
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40a881
xor eax, eax
test esi, esi
je 0x40a5ae
jmp 0x40a4e0
mov ecx, dword [ebx + 0x360]
mov edx, dword [ecx]
mov ecx, dword [edx + 8]
mov edx, dword [ecx + eax*4]
mov ecx, dword [edx]
mov edx, dword [ebp - 0x1c]
mov dword [edx + eax*4], ecx
inc eax
mov dword [ebp + 8], eax
cmp dword [ebp - 8], eax
jbe 0x40a54a
test ecx, ecx
je 0x40a59a
mov eax, ecx
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a510
mov edi, dword [ebp - 0xc]
sub eax, esi
push edi
mov esi, eax
push esi
push 1
push ecx
call fcn.0043a5a0
add esp, 0x10
push edi
cmp eax, esi
jne 0x40a879
push 1
push 1
push 0x46dc0c
call fcn.0043a5a0
add esp, 0x10
cmp eax, 1
jmp 0x40a58b
test ecx, ecx
je 0x40a59a
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a553
mov edi, dword [ebp - 0xc]
sub eax, esi
push edi
mov esi, eax
push esi
push 1
push ecx
call fcn.0043a5a0
add esp, 0x10
push edi
cmp eax, esi
jne 0x40a879
push 2
push 1
push 0x46dc10
call fcn.0043a5a0
add esp, 0x10
cmp eax, 2
push edi
jne 0x40a879
call fcn.0043a862
add esp, 4
mov ecx, dword [ebx + 0x360]
mov eax, dword [ebp + 8]
mov edx, dword [ecx]
cmp eax, dword [edx + 0xc]
jb 0x40a4e0
xor eax, eax
cmp dword [ebx + 0x364], eax
jbe 0x40a85b
lea esp, [esp]
mov ecx, dword [ebx + 0x360]
mov edx, dword [ecx + eax*4]
mov ecx, dword [edx]
inc eax
cmp eax, dword [ebx + 0x128]
mov dword [ebp - 0x10], ecx
setb byte [ebp + 0xb]
mov dword [ebp - 0x30], eax
test ecx, ecx
je 0x40a629
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a5e5
sub eax, esi
push edi
mov esi, eax
push esi
push 1
push ecx
call fcn.0043a5a0
add esp, 0x10
push edi
cmp eax, esi
jne 0x40a879
push 1
push 1
push 0x46dc0c
call fcn.0043a5a0
add esp, 0x10
push edi
cmp eax, 1
jne 0x40a879
call fcn.0043a862
add esp, 4
xor eax, eax
cmp dword [ebp - 8], eax
jbe 0x40a835
lea ecx, [eax + 1]
mov dword [ebp - 0x2c], ecx
cmp ecx, dword [ebp - 8]
jae 0x40a648
mov dword [ebp - 4], 0x46dc0c
jmp 0x40a65c
cmp byte [ebp + 0xb], 0
mov dword [ebp - 4], 0x46daf4
jne 0x40a65c
mov dword [ebp - 4], 0x46dc10
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, ebx
mov dword [ebp - 0x14], edx
call fcn.004075c0
mov edi, eax
cmp edi, 0xffffffff
jle 0x40a826
cmp edi, dword [ebx + 0x364]
jae 0x40a826
mov ecx, dword [ebx + 0x360]
mov esi, dword [ecx + edi*4]
mov ecx, esi
call fcn.00406750
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40a6b4
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0x1c]
push edx
mov edx, dword [esi + 0x34]
push eax
push edx
call fcn.004061f0
mov dword [ebp - 0x24], edx
jmp 0x40a6ba
or eax, 0xffffffff
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jle 0x40a826
mov ecx, dword [ebx + 0x360]
mov edx, dword [ecx + edi*4]
mov ecx, dword [edx + 8]
mov edx, dword [ecx + eax*4]
cmp dword [edx + 4], 0
je 0x40a826
mov eax, dword [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004075c0
mov edi, eax
cmp edi, 0xffffffff
jle 0x40a742
cmp edi, dword [ebx + 0x364]
jae 0x40a742
mov ecx, dword [ebx + 0x360]
mov esi, dword [ecx + edi*4]
mov ecx, esi
call fcn.00406750
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40a723
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0x1c]
push edx
mov edx, dword [esi + 0x34]
push eax
push edx
call fcn.004061f0
mov dword [ebp - 0x24], edx
jmp 0x40a729
or eax, 0xffffffff
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jle 0x40a742
mov ecx, dword [ebx + 0x360]
mov edx, dword [ecx + edi*4]
mov ecx, dword [edx + 8]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 4]
jmp 0x40a744
xor eax, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a747
sub eax, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a760
sub eax, edx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.004075c0
mov edi, eax
cmp edi, 0xffffffff
jle 0x40a7d2
cmp edi, dword [ebx + 0x364]
jae 0x40a7d2
mov ecx, dword [ebx + 0x360]
mov esi, dword [ecx + edi*4]
mov ecx, esi
call fcn.00406750
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40a7b3
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0x1c]
push edx
mov edx, dword [esi + 0x34]
push eax
push edx
call fcn.004061f0
mov dword [ebp - 0x14], edx
jmp 0x40a7b9
or eax, 0xffffffff
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jle 0x40a7d2
mov ecx, dword [ebx + 0x360]
mov edx, dword [ecx + edi*4]
mov ecx, dword [edx + 8]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 4]
jmp 0x40a7d4
xor eax, eax
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x20]
push edi
push esi
push 1
push eax
call fcn.0043a5a0
add esp, 0x10
cmp eax, esi
jne 0x40a878
mov edx, dword [ebp - 4]
test edx, edx
je 0x40a81d
mov eax, edx
lea esi, [eax + 1]
jmp 0x40a800
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a800
sub eax, esi
je 0x40a81d
push edi
push eax
push 1
push edx
call fcn.0043a5a0
add esp, 0x10
cmp eax, dword [ebp - 0x24]
jne 0x40a878
push edi
call fcn.0043a862
add esp, 4
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 8]
jb 0x40a634
mov edi, dword [ebp - 0xc]
push edi
push 2
push 1
push 0x46dc10
call fcn.0043a5a0
add esp, 0x10
cmp eax, 2
jne 0x40a878
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebx + 0x364]
jb 0x40a5c0
push edi
call fcn.00438ef6
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00436a3d
add esp, 8
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
call fcn.00438ef6
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4