Function at 0x412b20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x462058
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x47c748]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x47c748]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
cmp dword [ecx + 0x3c], 0
mov dword [esp + 0x10], ecx
je 0x412e41
cmp byte [ecx + 0x42], 0
je 0x412e41
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffff
call edx
movzx eax, ax
cmp ax, 0xffff
je 0x412e34
mov ecx, 0xf
xor eax, eax
cmp ecx, 0x10
mov byte [esp + 0x20], 0
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 8
jae 0x412bb1
lea eax, [esp + 0x20]
mov byte [eax + 8], 0
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
cmp edx, 0x10
jb 0x412cd8
test eax, eax
mov ebx, eax
mov dword [esp + 0x14], ebx
je 0x412bfc
cmp edx, 0x10
mov ecx, eax
jae 0x412be3
lea ecx, [esp + 0x20]
cmp ecx, ebx
ja 0x412bfc
cmp edx, 0x10
mov ecx, eax
jae 0x412bf2
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add ecx, esi
cmp ebx, ecx
jbe 0x412c09
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x412c34
cmp edx, 0x10
mov ecx, eax
jae 0x412c1d
lea ecx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add ecx, esi
cmp ebx, ecx
jb 0x412c34
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp edx, 0x10
mov edi, dword [esp + 0x30]
jb 0x412ce5
test eax, eax
mov esi, eax
je 0x412c6f
cmp edx, 0x10
mov ecx, eax
jae 0x412c52
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x412c6f
cmp edx, 0x10
mov ecx, eax
jae 0x412c61
lea ecx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add ecx, ebx
cmp esi, ecx
mov ebx, dword [esp + 0x14]
jbe 0x412c7c
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x412c9d
cmp edx, 0x10
jae 0x412c8e
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x30]
add eax, edx
cmp esi, eax
jb 0x412c9d
call fcn.0043496b
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
add ebx, edi
push ebx
push esi
add eax, 0x44
push eax
call edx
sub eax, 0
je 0x412cee
sub eax, 1
je 0x412cf6
sub eax, 2
lea ecx, [esp + 0x1c]
jne 0x412e2f
jmp 0x412e3c
lea ebx, [esp + 0x20]
mov dword [esp + 0x14], ebx
jmp 0x412bd8
lea esi, [esp + 0x20]
jmp 0x412c47
mov eax, dword [esp + 0x10]
mov byte [eax + 0x42], 0
mov edx, dword [esp + 0x34]
cmp edx, 0x10
mov eax, dword [esp + 0x20]
jb 0x412e19
test eax, eax
mov esi, eax
je 0x412d31
cmp edx, 0x10
mov ecx, eax
jae 0x412d18
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x412d31
cmp edx, 0x10
mov ecx, eax
jae 0x412d27
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add ecx, edi
cmp esi, ecx
jbe 0x412d3e
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x412d69
cmp edx, 0x10
mov ecx, eax
jae 0x412d52
lea ecx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add ecx, edi
cmp esi, ecx
jb 0x412d69
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, esi
je 0x412df6
cmp edx, 0x10
jb 0x412e22
test eax, eax
mov esi, eax
je 0x412da8
cmp edx, 0x10
mov ecx, eax
jae 0x412d8f
lea ecx, [esp + 0x20]
cmp ecx, esi
ja 0x412da8
cmp edx, 0x10
mov ecx, eax
jae 0x412d9e
lea ecx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add ecx, ebx
cmp esi, ecx
jbe 0x412db5
call fcn.0043496b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
cmp ecx, 0xfffffffe
je 0x412dd6
cmp edx, 0x10
jae 0x412dc7
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x30]
add eax, edx
cmp esi, eax
jb 0x412dd6
call fcn.0043496b
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.004360fb
add esp, 0x10
cmp edi, eax
jne 0x412e2b
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x42], 0
je 0x412e38
test edi, edi
jne 0x412bc5
push edi
push 8
lea ecx, [esp + 0x24]
call fcn.004122b0
jmp 0x412bbd
lea esi, [esp + 0x20]
jmp 0x412d0d
lea esi, [esp + 0x20]
jmp 0x412d84
lea ecx, [esp + 0x1c]
call fcn.00403590
xor al, al
jmp 0x412e43
lea ecx, [esp + 0x1c]
call fcn.00403590
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00432f66
mov esp, ebp
pop ebp
ret