Function at 0x406fa0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49ec20
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4c60c4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x98]
test eax, eax
je 0x4070a1
cmp byte [esi + 1], 0
je 0x4070a1
mov byte [eax], 0
mov edi, dword [esi + 0x98]
test edi, edi
je 0x4070a1
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.0041d180
mov byte [ebp - 4], 1
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x40702a
mov eax, dword [0x4c8150]
test eax, eax
je 0x40701b
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov byte [ebp - 4], 2
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x407053
mov eax, dword [0x4c8150]
test eax, eax
je 0x407044
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov byte [ebp - 4], 3
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x40707c
mov eax, dword [0x4c8150]
test eax, eax
je 0x40706d
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x4c8150]
test eax, eax
je 0x407092
dec dword [eax + 0x374]
push dword [0x4c8148]
push edi
call fcn.00402880
add esp, 8
cmp byte [esi], 0
mov dword [esi + 0x98], 0
je 0x4077bf
cmp byte [esi + 0x2e1c], 0
je 0x40711b
mov edi, dword [esi + 0x20]
test edi, edi
je 0x40711b
mov ebx, dword [0x4c8150]
lea ecx, [ebp - 0x10]
mov dword [0x4c8150], esi
mov dword [esi + 0x2e20], 0
mov dword [ebp - 0x10], 0
call fcn.00411890
mov edx, 0x4b9ae8
mov dword [ebp - 0x14], eax
mov ecx, edi
call fcn.00402fa0
mov edi, eax
test edi, edi
je 0x407115
push edi
push dword [ebp - 0x10]
push 1
push dword [ebp - 0x14]
call fcn.0047dcc3
push edi
call fcn.0047d191
add esp, 0x14
mov dword [0x4c8150], ebx
xor edi, edi
cmp dword [esi + 0x19d8], edi
jle 0x407160
mov eax, dword [esi + 0x19e0]
mov ebx, dword [eax + edi*4]
test ebx, ebx
je 0x407157
mov ecx, ebx
call fcn.00404890
mov eax, dword [0x4c8150]
test eax, eax
je 0x407148
dec dword [eax + 0x374]
push dword [0x4c8148]
push ebx
call fcn.00402880
add esp, 8
inc edi
cmp edi, dword [esi + 0x19d8]
jl 0x407125
mov ecx, dword [esi + 0x19e0]
test ecx, ecx
je 0x4071a6
mov eax, dword [0x4c8150]
mov dword [esi + 0x19dc], 0
mov dword [esi + 0x19d8], 0
test eax, eax
je 0x40718d
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x19e0], 0
mov ecx, dword [esi + 0x19ec]
test ecx, ecx
je 0x4071ec
mov eax, dword [0x4c8150]
mov dword [esi + 0x19e8], 0
mov dword [esi + 0x19e4], 0
test eax, eax
je 0x4071d3
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x19ec], 0
mov ecx, dword [esi + 0x19f8]
test ecx, ecx
je 0x407232
mov eax, dword [0x4c8150]
mov dword [esi + 0x19f4], 0
mov dword [esi + 0x19f0], 0
test eax, eax
je 0x407219
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x19f8], 0
mov dword [esi + 0x1a18], 0
mov ecx, dword [esi + 0x1a04]
test ecx, ecx
je 0x407282
mov eax, dword [0x4c8150]
mov dword [esi + 0x1a00], 0
mov dword [esi + 0x19fc], 0
test eax, eax
je 0x407269
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1a04], 0
mov ecx, dword [esi + 0x1a10]
test ecx, ecx
je 0x4072c8
mov eax, dword [0x4c8150]
mov dword [esi + 0x1a0c], 0
mov dword [esi + 0x1a08], 0
test eax, eax
je 0x4072af
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1a10], 0
mov dword [esi + 0x1b50], 0
mov dword [esi + 0x1a24], 0
mov dword [esi + 0x1a20], 0
mov dword [esi + 0x1a1c], 0
mov dword [esi + 0x1a94], 0
mov dword [esi + 0x1a80], 0
mov dword [esi + 0x1a28], 0
mov ecx, dword [esi + 0x1b1c]
test ecx, ecx
je 0x407354
mov eax, dword [0x4c8150]
mov dword [esi + 0x1b18], 0
mov dword [esi + 0x1b14], 0
test eax, eax
je 0x40733b
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1b1c], 0
mov ecx, dword [esi + 0x1b28]
test ecx, ecx
je 0x40739a
mov eax, dword [0x4c8150]
mov dword [esi + 0x1b24], 0
mov dword [esi + 0x1b20], 0
test eax, eax
je 0x407381
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1b28], 0
mov ecx, dword [esi + 0x1b34]
test ecx, ecx
je 0x4073e0
mov eax, dword [0x4c8150]
mov dword [esi + 0x1b30], 0
mov dword [esi + 0x1b2c], 0
test eax, eax
je 0x4073c7
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1b34], 0
mov ecx, dword [esi + 0x1b40]
test ecx, ecx
je 0x407426
mov eax, dword [0x4c8150]
mov dword [esi + 0x1b3c], 0
mov dword [esi + 0x1b38], 0
test eax, eax
je 0x40740d
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1b40], 0
mov ecx, dword [esi + 0x1b4c]
test ecx, ecx
je 0x40746c
mov eax, dword [0x4c8150]
mov dword [esi + 0x1b48], 0
mov dword [esi + 0x1b44], 0
test eax, eax
je 0x407453
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1b4c], 0
lea edi, [esi + 0x1cc0]
mov ebx, 2
mov ecx, dword [edi]
test ecx, ecx
je 0x4074af
mov eax, dword [0x4c8150]
mov dword [edi - 4], 0
mov dword [edi - 8], 0
test eax, eax
je 0x40749a
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [edi], 0
add edi, 0xc
sub ebx, 1
jne 0x407477
lea ecx, [esi + 0x1cd4]
call fcn.0041a5e0
lea ecx, [esi + 0x1d70]
call fcn.0041a5e0
lea ecx, [esi + 0x1ea4]
call fcn.00412150
mov ecx, dword [esi + 0x1ec8]
test ecx, ecx
je 0x407516
mov eax, dword [0x4c8150]
mov dword [esi + 0x1ec4], ebx
mov dword [esi + 0x1ec0], ebx
test eax, eax
je 0x4074fd
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1ec8], 0
mov ecx, dword [esi + 0x1ed4]
test ecx, ecx
je 0x40755c
mov eax, dword [0x4c8150]
mov dword [esi + 0x1ed0], 0
mov dword [esi + 0x1ecc], 0
test eax, eax
je 0x407543
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1ed4], 0
mov ecx, dword [esi + 0x2dfc]
test ecx, ecx
je 0x4075a2
mov eax, dword [0x4c8150]
mov dword [esi + 0x2df8], 0
mov dword [esi + 0x2df4], 0
test eax, eax
je 0x407589
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x2dfc], 0
mov ecx, dword [esi + 0x2e08]
test ecx, ecx
je 0x4075e8
mov eax, dword [0x4c8150]
mov dword [esi + 0x2e04], 0
mov dword [esi + 0x2e00], 0
test eax, eax
je 0x4075cf
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x2e08], 0
mov ecx, dword [esi + 0x1ef4]
test ecx, ecx
je 0x40762e
mov eax, dword [0x4c8150]
mov dword [esi + 0x1ef0], 0
mov dword [esi + 0x1eec], 0
test eax, eax
je 0x407615
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1ef4], 0
mov ecx, dword [esi + 0x1f00]
test ecx, ecx
je 0x407674
mov eax, dword [0x4c8150]
mov dword [esi + 0x1efc], 0
mov dword [esi + 0x1ef8], 0
test eax, eax
je 0x40765b
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1f00], 0
mov ecx, dword [esi + 0x1f0c]
test ecx, ecx
je 0x4076ba
mov eax, dword [0x4c8150]
mov dword [esi + 0x1f08], 0
mov dword [esi + 0x1f04], 0
test eax, eax
je 0x4076a1
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x1f0c], 0
mov ecx, dword [esi + 0x2e44]
test ecx, ecx
je 0x407700
mov eax, dword [0x4c8150]
mov dword [esi + 0x2e40], 0
mov dword [esi + 0x2e3c], 0
test eax, eax
je 0x4076e7
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x2e44], 0
mov ecx, dword [esi + 0x2e38]
test ecx, ecx
je 0x407746
mov eax, dword [0x4c8150]
mov dword [esi + 0x2e34], 0
mov dword [esi + 0x2e30], 0
test eax, eax
je 0x40772d
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x2e38], 0
cmp dword [esi + 0x2e50], 0
je 0x407776
mov edi, dword [esi + 0x2e50]
push 1
call fcn.0047cd4e
add esp, 4
cmp edi, eax
je 0x40776c
push edi
call fcn.0047d191
add esp, 4
mov dword [esi + 0x2e50], 0
mov ecx, dword [esi + 0x2e5c]
test ecx, ecx
je 0x4077bc
mov eax, dword [0x4c8150]
mov dword [esi + 0x2e58], 0
mov dword [esi + 0x2e54], 0
test eax, eax
je 0x4077a3
dec dword [eax + 0x374]
push dword [0x4c8148]
push ecx
call fcn.00402880
add esp, 8
mov dword [esi + 0x2e5c], 0
mov byte [esi], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret