Function at 0x100502c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x48
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x30], edx
push esi
push edi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x100502e9
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x100502fc
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp + 0x18]
jae 0x100502fa
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x100502fc
xor ecx, ecx
mov eax, ebp
mov edx, 0x18
lea ebx, [edx + eax]
movzx eax, cl
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x28], ebx
test eax, eax
je 0x10050331
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x1005034d
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebx]
jae 0x10050345
movzx ecx, byte [eax]
inc eax
mov dword [esp + 0x18], ecx
mov dword [ebp + 0x14], eax
jmp 0x1005034d
mov dword [esp + 0x18], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10050369
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1005037b
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebx]
jae 0x10050379
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x1005037b
xor ecx, ecx
movzx eax, cl
mov ecx, ebp
mov dword [esp + 0x44], eax
call fcn.1004a700
mov ecx, ebp
mov dword [esp + 0x3c], eax
call fcn.1004a700
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x4c], eax
test ecx, ecx
je 0x100503b4
push ecx
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x100503c6
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebx]
jae 0x100503c4
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x100503c6
xor ecx, ecx
movzx eax, cl
mov ecx, ebp
mov dword [esp + 0x40], eax
call fcn.1004a700
mov ecx, ebp
call fcn.1004a700
mov ecx, ebp
call fcn.1004a700
mov ecx, ebp
mov dword [esp + 0x20], eax
call fcn.1004a700
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x1005040d
push ecx
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1005041f
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebx]
jae 0x1005041d
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x1005041f
xor ecx, ecx
mov eax, dword [ebp + 0x10]
movzx esi, cl
test eax, eax
je 0x1005043e
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x10050450
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebx]
jae 0x1005044e
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x10050450
xor ecx, ecx
mov edx, dword [esp + 0x44]
mov ebx, 1
cmp edx, 8
movzx eax, cl
mov dword [esp + 0x34], 0
mov byte [esp + 0x10], 0
lea ecx, [edx - 8]
mov byte [esp + 0x11], 0
cmovb ecx, edx
mov byte [esp + 0x12], 0
shr eax, 5
mov edx, ebx
and eax, ebx
mov byte [esp + 0x13], 0
sub edx, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x54], edx
cmp dword [esp + 0x20], ebx
jl 0x1005082d
mov edx, dword [esp + 0x24]
cmp edx, ebx
jl 0x1005082d
lea eax, [ecx - 1]
cmp eax, 2
ja 0x1005082d
cmp esi, 8
je 0x100504d8
cmp esi, 0x10
je 0x100504d8
cmp esi, 0x18
je 0x100504d8
cmp esi, 0x20
jne 0x1005082d
cmp byte [esp + 0x18], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
cmove eax, esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x5c]
mov dword [eax], edx
mov eax, esi
shr eax, 3
mov dword [esp + 0x50], eax
mov dword [0], eax
mov eax, edx
imul eax, ecx
mov edx, 4
xor ecx, ecx
mov dword [esp + 0x30], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100bb798
mov ecx, dword [ebp + 0x10]
add esp, 4
mov edx, dword [esp + 0x14]
mov dword [esp + 0x38], eax
test ecx, ecx
je 0x10050549
push 1
push edx
push ecx
call fcn.100b033b
add esp, 0xc
jmp 0x1005054c
add dword [ebp + 0x14], edx
cmp byte [esp + 0x18], 0
je 0x100505c2
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x1005056c
push 1
push ecx
push eax
call fcn.100b033b
add esp, 0xc
jmp 0x1005056f
add dword [ebp + 0x14], ecx
mov eax, dword [esp + 0x40]
imul eax, dword [esp + 0x4c]
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
push ebx
call fcn.100bb798
mov ecx, dword [ebp + 0x10]
add esp, 4
mov dword [esp + 0x34], eax
test ecx, ecx
je 0x100505a5
push ecx
push ebx
push 1
push eax
call fcn.100b63fb
add esp, 0x10
jmp 0x100505bd
mov esi, dword [ebp + 0x14]
push ebx
push esi
push eax
call fcn.100ab8d0
lea eax, [esi + ebx]
add esp, 0xc
mov esi, dword [esp + 0x1c]
mov dword [ebp + 0x14], eax
mov ebx, 1
mov edx, dword [esp + 0x30]
test edx, edx
jle 0x100507aa
mov ecx, dword [esp + 0x38]
add ecx, 2
xor eax, eax
mov dword [esp + 0x40], ecx
nop dword [eax + eax]
cmp dword [esp + 0x44], 8
jb 0x10050642
test eax, eax
jne 0x10050633
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10050607
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1005061d
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0x14]
cmp eax, dword [ecx]
jae 0x1005061b
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x1005061d
xor ecx, ecx
movzx ecx, cl
mov eax, ecx
and eax, 0x7f
inc eax
shr ecx, 7
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], ecx
jmp 0x10050642
cmp dword [esp + 0x48], 0
je 0x10050642
test ebx, ebx
je 0x10050778
cmp byte [esp + 0x18], 0
je 0x100506aa
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10050665
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1005067b
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0x14]
cmp eax, dword [ecx]
jae 0x10050679
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x1005067b
xor ecx, ecx
movzx eax, cl
xor ecx, ecx
cmp eax, dword [esp + 0x4c]
cmovl ecx, eax
imul ecx, dword [esp + 0x50]
test esi, esi
je 0x100506f6
add ecx, dword [esp + 0x34]
lea edx, [esp + 0x14]
mov eax, esi
shr eax, 3
push eax
push ecx
push edx
call fcn.100ab8d0
add esp, 0xc
jmp 0x100506f6
test esi, esi
je 0x100506f6
xor esi, esi
lea ebx, [esp + 0x14]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x100506d0
push eax
call fcn.100bc447
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x100506e6
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0x14]
cmp eax, dword [ecx]
jae 0x100506e4
movzx ecx, byte [eax]
inc eax
mov dword [ebp + 0x14], eax
jmp 0x100506e6
xor ecx, ecx
mov byte [ebx], cl
add esi, 8
inc ebx
cmp esi, dword [esp + 0x1c]
jl 0x100506b4
mov esi, dword [esp + 0x1c]
lea eax, [esi - 8]
cmp eax, 0x18
ja case.0x10050705.9
movzx eax, byte [eax + 0x1005084c]
jmp dword [eax*4 + 0x10050838]
mov cl, byte [esp + 0x14]
mov byte [esp + 0x10], cl
mov byte [esp + 0x11], cl
mov byte [esp + 0x13], 0xff
mov byte [esp + 0x12], cl
jmp case.0x10050705.9
mov eax, dword [esp + 0x14]
mov cl, al
mov byte [esp + 0x10], cl
mov byte [esp + 0x11], cl
mov byte [esp + 0x13], ah
mov byte [esp + 0x12], cl
jmp case.0x10050705.9
mov cl, byte [esp + 0x16]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x10], cl
mov byte [esp + 0x12], al
mov byte [esp + 0x13], 0xff
jmp 0x1005076a
mov al, byte [esp + 0x16]
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x14]
mov byte [esp + 0x12], al
mov al, byte [esp + 0x17]
mov byte [esp + 0x13], al
mov byte [esp + 0x11], ah
mov eax, dword [esp + 0x2c]
xor ebx, ebx
mov ecx, dword [esp + 0x40]
mov dl, byte [esp + 0x10]
dec eax
mov byte [ecx - 2], dl
mov dl, byte [esp + 0x11]
mov byte [ecx - 1], dl
mov dl, byte [esp + 0x12]
mov byte [ecx], dl
mov dl, byte [esp + 0x13]
mov byte [ecx + 1], dl
add ecx, 4
sub dword [esp + 0x30], 1
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], ecx
jne 0x100505e0
cmp dword [esp + 0x54], 0
je 0x10050810
mov eax, dword [esp + 0x20]
xor ebp, ebp
mov edx, dword [esp + 0x24]
xor ecx, ecx
xor ebx, ebx
shl eax, 2
mov dword [esp + 0x54], eax
mov edi, eax
test edi, edi
jle 0x10050802
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
sub eax, ecx
dec eax
imul eax, dword [esp + 0x20]
lea esi, [ebx + edx]
lea eax, [ebx + eax*4]
add eax, edx
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 0x100507e4
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x24]
inc ebp
add ebx, eax
lea ecx, [ebp*2]
cmp ecx, edx
jl 0x100507c6
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10050821
push eax
call fcn.100b61b5
add esp, 4
mov eax, dword [esp + 0x38]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x48
ret