Function at 0x100b4c40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1019c020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x10185dd4
push eax
mov dword [ebp - 0x20], eax
xor edi, edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call fcn.1012f9ff
mov esi, eax
add esp, 8
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x100b4cb4
push dword [ebp - 0x20]
call fcn.1013daec
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012b4a2
mov esp, ebp
pop ebp
ret
push esi
call fcn.10130dde
add esp, 4
cmp eax, 0x50
jne 0x100b4f36
push esi
call fcn.10130dde
add esp, 4
cmp eax, 0x35
jne 0x100b4f36
jmp 0x100b4ce0
mov esi, dword [ebp - 0x14]
nop dword [eax]
cmp edi, 3
jge 0x100b4d81
push esi
call fcn.10130dde
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
je 0x100b4d78
cmp esi, 0x23
jne 0x100b4d07
mov dword [ebp - 0x1c], 1
jmp 0x100b4cda
cmp esi, 0xa
jne 0x100b4d15
mov dword [ebp - 0x1c], 0
jmp 0x100b4d1b
cmp dword [ebp - 0x1c], 0
jne 0x100b4cda
push esi
call fcn.101395fa
add esp, 4
test eax, eax
je 0x100b4d31
mov dword [ebp - 0x18], 1
jmp 0x100b4d37
cmp dword [ebp - 0x18], 0
je 0x100b4cda
push esi
call fcn.101395fa
add esp, 4
test eax, eax
je 0x100b4d57
mov eax, dword [ebp + edi*4 - 0x10]
lea eax, [eax + eax*4]
lea eax, [eax - 0x18]
lea eax, [esi + eax*2]
mov dword [ebp + edi*4 - 0x10], eax
jmp 0x100b4cda
push esi
call fcn.10139656
mov esi, dword [ebp - 0x14]
add esp, 4
test eax, eax
je 0x100b4f36
mov dword [ebp - 0x18], 0
inc edi
jmp 0x100b4ce0
cmp edi, 3
jl 0x100b4f33
movzx ecx, word [ebx + 0x66b6]
cmp dword [ebp - 0x10], ecx
jne 0x100b4f16
movzx eax, word [ebx + 0x66b4]
cmp dword [ebp - 0xc], eax
jne 0x100b4f16
cmp dword [ebp - 8], 0xffff
jne 0x100b4f16
push 2
push ecx
call fcn.101373f7
mov esi, eax
push str.subtract__
push esi
push ebx
mov dword [ebp - 0x1c], esi
call fcn.100a87b0
xor edi, edi
xor eax, eax
add esp, 0x14
mov dword [ebp - 0x18], edi
cmp ax, word [ebx + 0x66b4]
jae 0x100b4eea
nop
push dword [ebp - 0x14]
movzx eax, word [ebx + 0x66b6]
push eax
push 2
push esi
call fcn.1013019f
xor eax, eax
add esp, 0x10
xor esi, esi
cmp ax, word [ebx + 0x66b6]
jae 0x100b4ed4
mov eax, edi
and eax, 7
add eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + esi*2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [ebx + 0x66bc]
mov edx, dword [ebp - 0x18]
movzx edi, ax
mov eax, esi
and eax, 1
sar edx, cl
add eax, dword [ebp - 0x24]
add eax, eax
mov dword [ebp - 0x20], eax
movzx eax, word [ebx + 0x66c0]
imul edx, eax
mov eax, esi
sar eax, cl
mov ecx, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebx + 0x65b0]
shr eax, cl
and eax, 3
lea ecx, [eax + edx*4]
mov eax, dword [ebx + 0x66e0]
lea ecx, [eax + ecx*2]
movzx eax, word [ecx]
sub eax, edi
test eax, eax
jle 0x100b4ebc
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + esi*2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, word [ebx + 0x66bc]
mov edx, dword [ebp - 0x18]
movzx edi, ax
movzx eax, word [ebx + 0x66c0]
sar edx, cl
imul edx, eax
mov eax, esi
sar eax, cl
mov ecx, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebx + 0x65b0]
shr eax, cl
and eax, 3
lea ecx, [eax + edx*4]
mov eax, dword [ebx + 0x66e0]
lea ecx, [eax + ecx*2]
movzx eax, word [ecx]
sub eax, edi
jmp 0x100b4ebe
xor eax, eax
mov word [ecx], ax
inc esi
movzx eax, word [ebx + 0x66b6]
cmp esi, eax
jl 0x100b4e11
mov edi, dword [ebp - 0x18]
movzx eax, word [ebx + 0x66b4]
inc edi
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edi
cmp edi, eax
jl 0x100b4de0
push dword [ebp - 0x14]
call fcn.1012fa8c
push esi
call fcn.1012f84b
add esp, 8
mov dword [ebx + 0x65f8], 0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1012b4a2
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x20]
push str._s_has_the_wrong_dimensions__n
push 2
call fcn.10139778
add esp, 4
push eax
call fcn.10001240
push dword [ebp - 0x14]
jmp 0x100b4f4f
mov esi, dword [ebp - 0x14]
push dword [ebp - 0x20]
push str._s_is_not_a_valid_PGM_file__n
push 2
call fcn.10139778
add esp, 4
push eax
call fcn.10001240
push esi
call fcn.1012fa8c
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.1012b4a2
mov esp, ebp
pop ebp
ret