Function at 0x1004fe70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
mov ebx, ecx
mov dword [ebp - 0x30], edx
push esi
push edi
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebx + 0x10]
lea edi, [ebx + 0x14]
test eax, eax
je 0x1004fea0
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004feb1
mov eax, dword [edi]
cmp eax, dword [ebx + 0x18]
jae 0x1004feaf
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004feb1
xor ecx, ecx
mov eax, ebx
mov edx, 0x18
lea esi, [edx + eax]
movzx eax, cl
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x14], esi
test eax, eax
je 0x1004fee3
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov dword [ebp - 0xc], ecx
jmp 0x1004fefb
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x1004fef4
movzx ecx, byte [eax]
inc eax
mov dword [ebp - 0xc], ecx
mov dword [edi], eax
jmp 0x1004fefb
mov dword [ebp - 0xc], 0
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x1004ff17
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004ff27
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x1004ff25
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004ff27
xor ecx, ecx
movzx eax, cl
mov ecx, ebx
mov dword [ebp - 0x3c], eax
call fcn.1004a2e0
mov ecx, ebx
mov dword [ebp - 8], eax
call fcn.1004a2e0
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x1004ff5d
push ecx
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004ff6d
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x1004ff6b
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004ff6d
xor ecx, ecx
movzx eax, cl
mov ecx, ebx
mov dword [ebp - 0x38], eax
call fcn.1004a2e0
mov ecx, ebx
call fcn.1004a2e0
mov ecx, ebx
call fcn.1004a2e0
mov ecx, ebx
mov dword [ebp - 0x20], eax
call fcn.1004a2e0
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x24], eax
test ecx, ecx
je 0x1004ffb1
push ecx
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004ffc1
mov eax, dword [edi]
cmp eax, dword [esi]
jae 0x1004ffbf
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004ffc1
xor ecx, ecx
mov eax, dword [ebx + 0x10]
movzx esi, cl
test eax, eax
je 0x1004ffe0
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004fff3
mov ecx, dword [ebp - 0x14]
mov eax, dword [edi]
cmp eax, dword [ecx]
jae 0x1004fff1
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004fff3
xor ecx, ecx
mov edx, dword [ebp - 0x3c]
cmp edx, 8
movzx eax, cl
mov dword [ebp - 0x34], 0
mov byte [ebp - 1], 0
lea ecx, [edx - 8]
mov byte [ebp - 2], 0
cmovb ecx, edx
mov byte [ebp - 3], 0
shr eax, 5
mov edx, 1
and eax, 1
mov byte [ebp - 4], 0
sub edx, eax
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x20], 1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x50], edx
jl 0x10050396
mov edx, dword [ebp - 0x24]
cmp edx, 1
jl 0x10050396
lea eax, [ecx - 1]
cmp eax, 2
ja 0x10050396
cmp esi, 8
je 0x10050078
cmp esi, 0x10
je 0x10050078
cmp esi, 0x18
je 0x10050078
cmp esi, 0x20
jne 0x10050396
mov eax, dword [ebp - 0x30]
cmp byte [ebp - 0xc], 0
mov ecx, dword [ebp - 0x38]
cmove ecx, esi
mov esi, dword [ebp - 0x20]
mov dword [eax], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
mov dword [eax], edx
mov eax, ecx
shr eax, 3
xor ecx, ecx
mov dword [ebp - 0x4c], eax
mov dword [0], eax
mov eax, edx
imul eax, esi
mov edx, 4
mov dword [ebp - 0x30], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100d54d4
mov ecx, dword [ebx + 0x10]
add esp, 4
mov edx, dword [ebp - 0x18]
mov esi, eax
mov dword [ebp - 0x28], esi
test ecx, ecx
je 0x100500dd
push 1
push edx
push ecx
call fcn.100d02ea
add esp, 0xc
jmp 0x100500df
add dword [edi], edx
cmp byte [ebp - 0xc], 0
je 0x1005014e
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 8]
test eax, eax
je 0x100500fd
push 1
push ecx
push eax
call fcn.100d02ea
add esp, 0xc
jmp 0x100500ff
add dword [edi], ecx
mov eax, dword [ebp - 0x38]
imul eax, dword [ebp - 0x44]
cdq
and edx, 7
lea esi, [edx + eax]
sar esi, 3
push esi
mov dword [ebp - 0x38], esi
call fcn.100d54d4
mov ecx, dword [ebx + 0x10]
add esp, 4
mov dword [ebp - 0x34], eax
test ecx, ecx
je 0x10050135
push ecx
push esi
push 1
push eax
call fcn.100cfe9a
add esp, 0x10
jmp 0x1005014b
push dword [ebp - 0x38]
mov esi, dword [edi]
push esi
push eax
call fcn.100c7fd0
mov eax, dword [ebp - 0x38]
add esp, 0xc
add eax, esi
mov dword [edi], eax
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jle 0x10050316
add esi, 2
xor eax, eax
mov dword [ebp - 0x18], esi
mov dl, al
mov dh, al
cmp dword [ebp - 0x3c], 8
jb 0x100501c2
test eax, eax
jne 0x100501b2
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x1005018b
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1005019e
mov ecx, dword [ebp - 0x14]
mov eax, dword [edi]
cmp eax, dword [ecx]
jae 0x1005019c
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1005019e
xor ecx, ecx
movzx ecx, cl
mov eax, ecx
and eax, 0x7f
inc eax
shr ecx, 7
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x40], ecx
jmp 0x100501c2
cmp dword [ebp - 0x40], 0
je 0x100501c2
cmp dword [ebp - 0x48], 0
je 0x100502ec
cmp byte [ebp - 0xc], 0
je 0x1005022b
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x100501e4
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x100501f7
mov ecx, dword [ebp - 0x14]
mov eax, dword [edi]
cmp eax, dword [ecx]
jae 0x100501f5
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x100501f7
xor ecx, ecx
mov esi, dword [ebp - 0x4c]
movzx eax, cl
xor ecx, ecx
cmp eax, dword [ebp - 0x44]
cmovge eax, ecx
imul esi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10050276
add esi, dword [ebp - 0x34]
lea edx, [ebp - 8]
mov ebx, eax
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx], al
add ecx, 8
inc edx
cmp ecx, ebx
jl 0x10050217
mov eax, dword [ebp - 0x10]
jmp 0x10050276
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10050279
xor esi, esi
lea ebx, [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x10050256
push eax
call fcn.100cf22c
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050269
mov ecx, dword [ebp - 0x14]
mov eax, dword [edi]
cmp eax, dword [ecx]
jae 0x10050267
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x10050269
xor ecx, ecx
mov eax, dword [ebp - 0x10]
add esi, 8
mov byte [ebx], cl
inc ebx
cmp esi, eax
jl 0x10050237
mov esi, dword [ebp - 0x18]
add eax, 0xfffffff8
cmp eax, 0x18
ja case.0x10050288.9
movzx eax, byte [eax + 0x100503b4]
jmp dword [eax*4 + 0x100503a0]
mov dl, byte [ebp - 8]
mov byte [ebp - 1], dl
mov byte [ebp - 2], dl
mov byte [ebp - 4], 0xff
mov byte [ebp - 3], dl
jmp case.0x10050288.9
mov eax, dword [ebp - 8]
mov dl, al
mov byte [ebp - 1], dl
mov byte [ebp - 2], dl
mov byte [ebp - 4], ah
mov byte [ebp - 3], dl
jmp case.0x10050288.9
mov dl, byte [ebp - 6]
mov eax, dword [ebp - 8]
mov byte [ebp - 1], dl
mov byte [ebp - 3], al
mov byte [ebp - 4], 0xff
jmp 0x100502d8
mov al, byte [ebp - 6]
mov byte [ebp - 1], al
mov eax, dword [ebp - 8]
mov byte [ebp - 3], al
mov al, byte [ebp - 5]
mov byte [ebp - 4], al
mov byte [ebp - 2], ah
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov dl, byte [ebp - 1]
mov dh, byte [ebp - 2]
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x30]
mov bl, byte [ebp - 3]
dec eax
mov byte [esi], bl
mov bl, byte [ebp - 4]
mov byte [esi + 1], bl
mov ebx, dword [ebp - 0x1c]
mov byte [esi - 2], dl
mov byte [esi - 1], dh
add esi, 4
sub ecx, 1
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x30], ecx
jne 0x10050165
cmp dword [ebp - 0x50], 0
je 0x1005037c
mov edx, dword [ebp - 0x20]
xor ecx, ecx
mov esi, dword [ebp - 0x24]
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x48], ecx
shl edx, 2
mov dword [ebp - 0x50], edx
mov edi, edx
test edi, edi
jle 0x1005036f
mov ecx, dword [ebp - 0x28]
not eax
add eax, dword [ebp - 0x24]
imul eax, dword [ebp - 0x20]
lea esi, [ebx + ecx]
lea eax, [ebx + eax*4]
add eax, ecx
nop dword [eax + eax]
mov cl, byte [eax]
lea esi, [esi + 1]
mov dl, byte [esi - 1]
lea eax, [eax + 1]
mov byte [esi - 1], cl
dec edi
mov byte [eax - 1], dl
test edi, edi
jg 0x10050350
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x24]
inc ecx
add ebx, edx
mov dword [ebp - 0x48], ecx
lea eax, [ecx + ecx]
cmp eax, esi
jl 0x10050331
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1005038c
push eax
call fcn.100cfa7f
add esp, 4
mov eax, dword [ebp - 0x28]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret