Function at 0x479d47
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x20
push ebx
mov ebx, ecx
push esi
push edi
test edx, edx
jne 0x479d60
xor al, al
jmp 0x47a089
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479d65
sub ecx, esi
je 0x479d59
xor edi, edi
cmp dword [ebx + 0x360], edi
je 0x479d59
push 0x4a6b4c
push edx
call fcn.004260ba
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x479d59
cmp dword [ebx + 0x394], edi
jne 0x479da8
push edi
push 0x4a513e
mov ecx, ebx
call fcn.00476e6d
mov dword [ebx + 0x394], eax
mov ecx, dword [ebx + 0x394]
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x479db3
push esi
sub edi, edx
push edi
push 1
push ecx
call fcn.004265ab
add esp, 0x10
push esi
cmp eax, edi
je 0x479dda
call fcn.00426699
xor al, al
jmp 0x47a088
push 1
push 1
push 0x4a6048
call fcn.004265ab
add esp, 0x10
cmp eax, 1
je 0x479df3
push esi
jmp 0x479dce
mov eax, dword [ebx + 0x35c]
mov eax, dword [eax]
mov edi, dword [eax + 0xc]
mov eax, edi
shl eax, 2
push eax
mov dword [ebp - 4], edi
call fcn.004249e8
mov dword [ebp - 0xc], eax
pop ecx
test eax, eax
je 0x479d59
xor edx, edx
test edi, edi
je 0x479ee3
mov eax, dword [ebx + 0x35c]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov eax, dword [eax + edx*4]
mov ecx, dword [eax]
mov eax, dword [ebp - 0xc]
mov dword [eax + edx*4], ecx
inc edx
mov dword [ebp + 8], edx
cmp edi, edx
jbe 0x479e82
test ecx, ecx
je 0x479ecf
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x479e4d
push esi
sub edi, edx
push edi
push 1
push ecx
call fcn.004265ab
add esp, 0x10
push esi
cmp eax, edi
jne 0x479dce
push 1
push 1
push 0x4a6048
call fcn.004265ab
add esp, 0x10
cmp eax, 1
jmp 0x479ebf
test ecx, ecx
je 0x479ecf
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x479e8b
push esi
sub edi, edx
push edi
push 1
push ecx
call fcn.004265ab
add esp, 0x10
push esi
cmp eax, edi
jne 0x479dce
push 2
mov eax, 0x4a5204
push 1
push eax
call fcn.004265ab
add esp, 0x10
cmp eax, 2
push esi
jne 0x479dce
call fcn.00428010
mov edx, dword [ebp + 8]
pop ecx
mov eax, dword [ebx + 0x35c]
mov edi, dword [ebp - 4]
mov eax, dword [eax]
cmp edx, dword [eax + 0xc]
jb 0x479e22
xor ecx, ecx
cmp dword [ebx + 0x360], ecx
jbe 0x47a077
mov eax, dword [ebx + 0x35c]
mov eax, dword [eax + ecx*4]
inc ecx
cmp ecx, dword [ebx + 0x124]
mov dword [ebp - 0x20], ecx
setb cl
mov edx, dword [eax]
mov dword [ebp - 8], edx
mov byte [ebp + 0xb], cl
test edx, edx
je 0x479f5e
mov edi, edx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x479f18
push esi
sub edi, ecx
push edi
push 1
push edx
call fcn.004265ab
add esp, 0x10
push esi
cmp eax, edi
jne 0x479dce
push 1
push 1
push 0x4a6048
call fcn.004265ab
add esp, 0x10
push esi
cmp eax, 1
jne 0x479dce
call fcn.00428010
mov edi, dword [ebp - 4]
pop ecx
mov cl, byte [ebp + 0xb]
xor eax, eax
test edi, edi
je 0x47a04c
test cl, cl
mov edi, 0x4a513e
mov ecx, 0x4a5204
cmove edi, ecx
mov dword [ebp - 0x1c], edi
mov edx, dword [ebp - 4]
lea ecx, [eax + 1]
mov dword [ebp - 0x10], ecx
mov ecx, 0x4a6048
cmp dword [ebp - 0x10], edx
mov edx, dword [ebp - 8]
cmovae ecx, edi
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 0xc]
push ecx
push 0
mov edi, dword [ecx + eax*4]
mov ecx, ebx
push edi
push edx
mov dword [ebp - 0x14], edi
call fcn.0047a5cb
test eax, eax
je 0x47a03a
push ecx
push 0
push edi
push dword [ebp - 8]
mov ecx, ebx
call fcn.0047a5cb
mov edi, eax
lea eax, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x479fc4
mov ecx, dword [ebp + 8]
sub edi, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479fd3
push esi
push edi
push 1
sub ecx, edx
push ecx
push ecx
push 0
push dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
mov ecx, ebx
push dword [ebp - 8]
call fcn.0047a5cb
pop ecx
push eax
call fcn.004265ab
add esp, 0x10
cmp eax, edi
jne 0x479df0
mov edx, dword [ebp + 8]
test edx, edx
je 0x47a033
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47a012
sub ecx, edi
je 0x47a033
push esi
push ecx
push 1
push edx
call fcn.004265ab
add esp, 0x10
cmp eax, dword [ebp - 0x18]
jne 0x479df0
push esi
call fcn.00428010
pop ecx
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
cmp eax, dword [ebp - 4]
jb 0x479f7a
mov edi, dword [ebp - 4]
push esi
push 2
mov eax, 0x4a5204
push 1
push eax
call fcn.004265ab
add esp, 0x10
cmp eax, 2
jne 0x479df0
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebx + 0x360]
jb 0x479ef1
push esi
call fcn.00426699
pop ecx
push dword [ebp - 0xc]
call fcn.004249b0
mov al, 1
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4