Function at 0x424160
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2d78
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x513330]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x513330]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, 0xffff
mov edi, ecx
mov dword [esp + 0x18], edi
cmp ax, si
jne 0x4241b1
xor eax, eax
jmp 0x4244cf
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x4241dd
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
lea edx, [ecx + edx*2]
cmp ecx, edx
jae 0x4241dd
dec dword [eax]
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 2]
mov dword [eax], edx
mov word [ecx], si
mov ax, si
jmp 0x4244cf
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x4244ca
cmp dword [edi + 0x3c], 0
jne 0x424210
push eax
push esi
call fcn.004a766b
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, si
jne 0x4244cf
mov eax, ecx
jmp 0x4244cf
movzx edx, si
lea esi, [esp + 0x34]
mov dword [esp + 0x14], edx
call fcn.00425080
add edi, 0x44
mov dword [esp + 0x60], 0
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x4c]
cmp edx, 0x10
jb 0x4243f8
mov ebx, ecx
mov dword [esp + 0x1c], ebx
test ecx, ecx
je 0x42426e
mov eax, ecx
cmp edx, 0x10
jae 0x424255
lea eax, [esp + 0x38]
cmp eax, ebx
ja 0x42426e
mov eax, ecx
cmp edx, 0x10
jae 0x424264
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jbe 0x42427b
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x4242a6
mov eax, ecx
cmp edx, 0x10
jae 0x42428f
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jb 0x4242a6
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
cmp edx, 0x10
jb 0x424405
mov edi, ecx
test ecx, ecx
je 0x4242e1
mov eax, ecx
cmp edx, 0x10
jae 0x4242c4
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x4242e1
mov eax, ecx
cmp edx, 0x10
jae 0x4242d3
lea eax, [esp + 0x38]
mov ebx, dword [esp + 0x48]
add eax, ebx
mov ebx, dword [esp + 0x1c]
cmp edi, eax
jbe 0x4242ee
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x424311
mov eax, ecx
cmp edx, 0x10
jae 0x424302
lea eax, [esp + 0x38]
mov ecx, dword [esp + 0x48]
add eax, ecx
cmp edi, eax
jb 0x424311
call fcn.004a717b
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x3c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
lea edx, [esp + 0x28]
push edx
add ebx, esi
push ebx
push edi
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x26]
push edx
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x38]
push edx
call eax
test eax, eax
jl 0x4244c1
cmp eax, 1
jg 0x424482
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
cmp edx, 0x10
jb 0x42440e
mov edi, ecx
test ecx, ecx
je 0x424388
mov eax, ecx
cmp edx, 0x10
jae 0x42436f
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x424388
mov eax, ecx
cmp edx, 0x10
jae 0x42437e
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jbe 0x424395
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x4243c0
mov eax, ecx
cmp edx, 0x10
jae 0x4243a9
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jb 0x4243c0
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
sub esi, edi
je 0x42444c
lea ebx, [esp + 0x2c]
lea edi, [esp + 0x34]
call fcn.004251b0
mov edi, eax
mov eax, dword [edi]
cmp eax, 0xfffffffc
je 0x424429
test eax, eax
jne 0x4243eb
call fcn.004a717b
mov eax, dword [edi]
cmp dword [eax + 0x18], 0x10
jb 0x424417
mov ecx, dword [eax + 4]
jmp 0x42441a
lea ebx, [esp + 0x38]
mov dword [esp + 0x1c], ebx
jmp 0x42424a
lea edi, [esp + 0x38]
jmp 0x4242b9
lea edi, [esp + 0x38]
jmp 0x424364
lea ecx, [eax + 4]
mov edx, dword [eax + 0x14]
add edx, ecx
cmp dword [edi + 4], edx
jb 0x424429
call fcn.004a717b
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x4c]
mov edi, dword [edi + 4]
push ecx
push esi
push 1
push edi
call fcn.004a7e34
add esp, 0x10
cmp esi, eax
jne 0x4244c1
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov byte [eax + 0x42], 1
lea eax, [esp + 0x14]
cmp dword [esp + 0x24], eax
jne 0x4244b2
test esi, esi
ja 0x424237
cmp dword [esp + 0x48], 0x20
jae 0x4244c1
push 0
mov eax, 8
lea edi, [esp + 0x38]
call fcn.004250e0
jmp 0x42422f
cmp eax, 3
jne 0x4244c1
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x4c]
mov ecx, dword [esp + 0x14]
call fcn.0041b860
movzx esi, word [ebp + 8]
test al, al
jne 0x4244a4
mov esi, 0xffff
lea ecx, [esp + 0x34]
call fcn.0042f1e0
mov ax, si
jmp 0x4244cf
lea ecx, [esp + 0x34]
call fcn.0042f1e0
mov ax, word [ebp + 8]
jmp 0x4244cf
lea ecx, [esp + 0x34]
call fcn.0042f1e0
mov eax, 0xffff
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004a52a5
mov esp, ebp
pop ebp
ret 4