Function at 0x10004ed0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004da58
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x10128088]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 4]
sub eax, dword [esi]
sar eax, 2
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x10004f41
lea ebx, [eax - 1]
mov dword [ebp - 0x2c], eax
xor ecx, ecx
test ebx, ebx
jle 0x10004f3b
mov eax, dword [esi]
mov edi, dword [eax + ecx*4]
mov edx, dword [eax + ecx*4 + 4]
mov edi, dword [edi + 4]
lea eax, [eax + ecx*4]
cmp edi, dword [edx + 4]
jge 0x10004f33
mov edi, dword [eax]
mov dword [eax], edx
mov edx, dword [esi]
mov dword [edx + ecx*4 + 4], edi
inc ecx
cmp ecx, ebx
jl 0x10004f15
mov eax, dword [ebp - 0x1c]
dec ebx
dec dword [ebp - 0x2c]
jne 0x10004f0f
xor edi, edi
test eax, eax
jle 0x10004f61
mov eax, dword [esi]
mov ecx, dword [eax + edi*4]
mov eax, dword [ecx + 4]
lea edx, [ecx + 8]
mov ecx, dword [ecx]
push edx
push esi
call fcn.100055c0
inc edi
cmp edi, dword [ebp - 0x1c]
jl 0x10004f47
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
and eax, 0xfffffffc
mov edi, eax
shl edi, 4
push edi
mov dword [ebp - 0x20], eax
call fcn.1003914b
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
push edi
push ecx
push eax
mov dword [ebp - 4], ecx
call fcn.1003ac40
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x30]
push eax
push 0x10000
push 2
push ecx
call fcn.10039aa5
mov edi, dword [ebp - 0x18]
xor eax, eax
add esp, 0x20
mov dword [edi + 4], 0xffffffff
mov dword [edi], 0xffffffff
mov dword [edi + 8], eax
cmp dword [ebp - 0x1c], eax
jle 0x10005262
xor edx, edx
mov word [ebp - 0x48], dx
mov dword [ebp - 0x50], eax
jmp 0x10004fe0
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx + eax*4]
mov edx, dword [ebp - 0x24]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], edx
mov edx, dword [eax]
movzx ecx, word [edx + ecx*8 - 8]
mov edx, dword [esi + 0x30]
movzx ecx, word [edx + ecx*2]
movsx edi, cx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x34], edi
lea edi, [edi + ecx + 1]
mov dword [ebp - 0x10], eax
cmp edi, dword [ebp - 0x20]
jl 0x10005048
mov eax, dword [ebp - 0x18]
sub edi, 0xffffff80
mov edx, edi
shl edx, 4
push edx
push eax
call fcn.10039b1f
mov ecx, dword [ebp - 0x20]
mov edx, edi
sub edx, ecx
shl edx, 4
push edx
shl ecx, 4
add ecx, eax
push 0
push ecx
mov dword [ebp - 0x18], eax
call fcn.1003ac40
mov eax, dword [ebp - 0x10]
add esp, 0x14
mov dword [ebp - 0x20], edi
xor ecx, ecx
cmp dword [eax + 4], ecx
jle 0x10005078
nop
mov edx, dword [eax]
movzx edi, word [edx + ecx*8]
mov edx, dword [esi + 0x30]
movzx edx, word [edx + edi*2]
add edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
add edx, edx
cmp dword [edi + edx*8], 0
je 0x10005072
inc dword [ebp - 0x1c]
xor ecx, ecx
jmp 0x10005073
inc ecx
cmp ecx, dword [eax + 4]
jl 0x10005050
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x1c]
shl ecx, 4
add ecx, dword [ebp - 0x18]
cmp word [ebp - 0x48], 0
mov dword [ecx], edx
je 0x10005097
mov edi, edx
or edi, 0x80000000
mov dword [ecx], edi
mov ecx, dword [ebp - 0x24]
sub edx, ecx
cmp edx, dword [esi + 0x34]
jl 0x100050a7
add ecx, dword [esi + 0x38]
mov dword [ebp - 0x24], ecx
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
cmp dword [eax + 4], ecx
jle 0x100051da
mov eax, dword [eax]
movzx edx, word [eax + ecx*8]
mov eax, dword [esi + 0x30]
movzx edi, word [eax + edx*2]
add edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
mov edx, edi
shl edx, 4
add eax, edx
mov edx, dword [ebp - 0x50]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x10]
mov dword [eax], 0xffffffff
mov edx, dword [edx]
mov ecx, dword [edx + ecx*8 + 4]
mov edx, dword [esi + 0x20]
mov ecx, dword [edx + ecx*4]
mov edx, dword [ebp - 0x10]
mov dword [eax + 0xc], ecx
mov eax, dword [edx]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax + ecx*8 + 4]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x10]
cmp dword [eax + edx*4], 0
je 0x100051c7
mov eax, dword [eax + edx*4]
mov ebx, dword [esi + 0x30]
mov dword [ebp - 0x30], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x28], edx
mov edx, dword [eax]
mov eax, dword [ebp - 0x28]
movzx eax, word [edx + eax*8 - 8]
movzx eax, word [ebx + eax*2]
movzx edx, word [edx]
movzx edx, word [ebx + edx*2]
sub eax, edx
mov edx, dword [ebp - 0x10]
lea eax, [eax + eax*2]
add eax, dword [edx + 4]
movzx ebx, word [ecx + 2]
sar eax, 2
cdq
idiv dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x10005170
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov dx, word [ebp - 0x28]
mov dword [eax], edi
mov word [eax + 8], bx
mov word [eax + 0xa], dx
mov dword [eax + 0xc], 0
jmp 0x1000519d
push 0x10
call fcn.10039cfe
add esp, 4
test eax, eax
je 0x1000519b
mov ecx, dword [ebp - 0x30]
mov dx, word [ebp - 0x28]
mov dword [eax], edi
mov dword [eax + 4], ecx
mov word [eax + 8], bx
mov word [eax + 0xa], dx
mov dword [eax + 0xc], 0
jmp 0x1000519d
xor eax, eax
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x100051bf
movzx ecx, word [ebx + 0xa]
cmp ecx, dword [ebp - 0x28]
jle 0x100051b5
mov edx, dword [ebp - 0x3c]
mov dword [edx + 0xc], eax
jmp 0x100051c4
mov dword [eax + 0xc], ebx
mov ebx, eax
mov dword [ebp - 0x40], ebx
jmp 0x100051c7
mov ebx, eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x10]
inc ecx
mov dword [ebp - 0x2c], ecx
cmp ecx, dword [eax + 4]
jl 0x100050b5
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x14]
jl 0x100051e8
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax]
test ecx, ecx
je 0x10005200
push ecx
call fcn.10039111
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
push eax
call fcn.10039725
add esp, 4
test ebx, ebx
je 0x1000525f
mov edx, dword [ebx + 8]
mov dword [ebp - 0x48], edx
cmp ebx, dword [ebp - 0x3c]
jne 0x1000523c
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x50], ecx
mov ecx, dword [ebx + 0xc]
mov dword [ebx + 0xc], edx
mov dword [ebp - 0x38], ebx
xor ebx, ebx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
jmp 0x10004fe0
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx]
mov edx, ecx
mov dword [ebp - 0x44], edx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 4]
mov dword [ebx + 0xc], edx
mov dword [ebp - 0x38], ebx
mov ebx, ecx
mov dword [ebp - 0x40], ebx
jmp 0x10004fe0
mov edi, dword [ebp - 0x18]
mov ecx, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
cmp ebx, ecx
je 0x1000528b
mov eax, ecx
sub eax, ecx
sar eax, 2
add eax, eax
add eax, eax
push eax
push ecx
push ebx
mov dword [ebp - 0x34], eax
call fcn.10038db0
add esp, 0xc
add ebx, dword [ebp - 0x34]
mov dword [esi + 0x14], ebx
mov ecx, dword [ebp + 8]
inc dword [ebp - 0x14]
push ecx
push 1
lea edx, [ebp - 0x14]
push 4
push edx
call fcn.10039aa5
mov eax, dword [ebp + 8]
push eax
push 1
lea ebx, [esi + 0x44]
push 1
push ebx
call fcn.10039aa5
add esp, 0x20
cmp byte [ebx], 0
je 0x100052c4
mov ecx, dword [ebp - 0x14]
dec ecx
push ecx
push edi
push esi
call fcn.100053a0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
push edx
push eax
push 0x10
push edi
call fcn.10039aa5
mov eax, dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x100052ee
push eax
call fcn.10039111
add esp, 4
mov dword [esi + 0x30], 0
push edi
call fcn.10039111
mov eax, dword [ebp - 0x38]
add esp, 4
test eax, eax
je 0x10005316
jmp 0x10005303
mov eax, dword [ebp - 0x38]
mov esi, dword [eax + 0xc]
push eax
call fcn.10039725
add esp, 4
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x10005300
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4