Function at 0x414190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x501fd8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x54eb90]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x54eb90]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov dword [esp + 0x1c], ebx
cmp eax, 0xffffffff
jne 0x4141dc
xor eax, eax
jmp 0x4144b8
mov ecx, dword [ebx + 0x24]
mov edx, dword [ecx]
test edx, edx
je 0x414203
mov ecx, dword [ebx + 0x34]
mov esi, dword [ecx]
add esi, edx
cmp edx, esi
jae 0x414203
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
jmp 0x4144b8
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x4144b5
cmp dword [ebx + 0x3c], 0
jne 0x414232
movsx eax, al
push ecx
push eax
call fcn.004c0f31
add esp, 8
cmp eax, 0xffffffff
je 0x4144b5
mov eax, dword [ebp + 8]
jmp 0x4144b8
push 0
push 8
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1b], al
call fcn.00414ed0
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x24]
call fcn.00402af0
mov edi, eax
test edi, edi
je 0x414278
lea ecx, [esp + 0x24]
call fcn.00402af0
cmp eax, edi
ja 0x414278
lea ecx, [esp + 0x24]
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jbe 0x41427d
call fcn.004bdd0a
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x414298
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jb 0x414298
call fcn.004bdd0a
lea ecx, [esp + 0x24]
call fcn.00402af0
mov esi, eax
test esi, esi
je 0x4142c5
lea ecx, [esp + 0x24]
call fcn.00402af0
cmp eax, esi
ja 0x4142c5
lea ecx, [esp + 0x24]
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp esi, eax
jbe 0x4142ca
call fcn.004bdd0a
lea edx, [esp + 0x24]
cmp edx, 0xfffffffc
je 0x4142e7
mov ecx, edx
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp esi, eax
jb 0x4142e7
call fcn.004bdd0a
lea ecx, [esp + 0x24]
call fcn.00435c90
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, edi
lea edi, [esp + 0x18]
push edi
push eax
push esi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [ebx + 0x44]
push eax
call edx
test eax, eax
jl 0x4144ac
cmp eax, 1
jg 0x414469
lea ecx, [esp + 0x24]
call fcn.00402af0
mov edi, eax
test edi, edi
je 0x414354
lea ecx, [esp + 0x24]
call fcn.00402af0
cmp eax, edi
ja 0x414354
lea ecx, [esp + 0x24]
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jbe 0x414359
call fcn.004bdd0a
lea eax, [esp + 0x24]
cmp eax, 0xfffffffc
je 0x414376
mov ecx, eax
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jb 0x414376
call fcn.004bdd0a
mov esi, dword [esp + 0x18]
sub esi, edi
je 0x4143e3
lea ecx, [esp + 0x24]
call fcn.00402af0
mov edi, eax
test edi, edi
je 0x4143ab
lea ecx, [esp + 0x24]
call fcn.00402af0
cmp eax, edi
ja 0x4143ab
lea ecx, [esp + 0x24]
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jbe 0x4143b0
call fcn.004bdd0a
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffc
je 0x4143cb
call fcn.00402af0
add eax, dword [esp + 0x38]
cmp edi, eax
jb 0x4143cb
call fcn.004bdd0a
mov edx, dword [ebx + 0x4c]
push edx
push esi
push 1
push edi
call fcn.004c179d
add esp, 0x10
cmp esi, eax
jne 0x4144ac
lea eax, [esp + 0x13]
mov byte [ebx + 0x41], 1
cmp dword [esp + 0x20], eax
jne 0x41449e
test esi, esi
ja 0x41424b
lea ecx, [esp + 0x24]
call fcn.00435c90
cmp eax, 0x20
jae 0x4144ac
or ecx, 0xffffffff
sub ecx, dword [esp + 0x38]
cmp ecx, 8
ja 0x414420
call fcn.004dd42a
mov edi, dword [esp + 0x38]
push 0
add edi, 8
push edi
lea ecx, [esp + 0x2c]
call fcn.00402830
test al, al
je 0x41424b
mov ebx, dword [esp + 0x38]
lea ecx, [esp + 0x24]
mov byte [esp + 0x14], 0
xor esi, esi
call fcn.00402af0
add eax, ebx
mov dword [eax], esi
push edi
lea ecx, [esp + 0x28]
mov dword [eax + 4], esi
call fcn.00402b20
mov ebx, dword [esp + 0x1c]
jmp 0x41424b
cmp eax, 3
jne 0x4144ac
mov eax, dword [ebx + 0x4c]
mov cl, byte [esp + 0x13]
call fcn.00412bc0
test al, al
je 0x41448e
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x24]
call fcn.00402be0
mov eax, esi
jmp 0x4144b8
lea ecx, [esp + 0x24]
or esi, 0xffffffff
call fcn.00402be0
mov eax, esi
jmp 0x4144b8
lea ecx, [esp + 0x24]
call fcn.00402be0
mov eax, dword [ebp + 8]
jmp 0x4144b8
lea ecx, [esp + 0x24]
call fcn.00402be0
or eax, 0xffffffff
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004bd72f
mov esp, ebp
pop ebp
ret 4