Function at 0x100a2dd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebp
xor ebp, ebp
push edi
mov edi, ecx
mov eax, dword [edi + 0x46c8c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ebp
cmp eax, ebp
je 0x100a2e23
mov ecx, dword [edi + 0x46c90]
push 2
push ebp
push 0x40
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x100a2e23
push 0x102419c0
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 6
call fcn.101525f9
mov eax, dword [esp + 0x2c]
push ebx
push 0x1023191c
push eax
call fcn.10150c51
mov ebx, eax
add esp, 8
mov dword [esp + 0x18], ebx
cmp ebx, ebp
jne 0x100a2e50
or dword [edi + 4], 0x200
pop ebx
pop edi
pop ebp
add esp, 0x20
ret 4
push esi
push ebx
call fcn.101524f5
add esp, 4
cmp eax, 0x50
jne 0x100a3155
push ebx
call fcn.101524f5
add esp, 4
cmp eax, 0x35
jne 0x100a3155
cmp ebp, 3
jge 0x100a2f1b
push ebx
call fcn.101524f5
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
je 0x100a2f12
cmp esi, 0x23
jne 0x100a2ea1
mov dword [esp + 0x10], 1
jmp 0x100a2e75
cmp esi, 0xa
jne 0x100a2eb0
mov dword [esp + 0x10], 0
jmp 0x100a2eb7
cmp dword [esp + 0x10], 0
jne 0x100a2e75
push esi
call fcn.1014fb03
add esp, 4
test eax, eax
je 0x100a2ece
mov dword [esp + 0x14], 1
jmp 0x100a2ed5
cmp dword [esp + 0x14], 0
je 0x100a2e75
push esi
call fcn.1014fb03
add esp, 4
test eax, eax
je 0x100a2ef3
mov eax, dword [esp + ebp*4 + 0x24]
lea ecx, [eax + eax*4]
lea edx, [esi + ecx*2 - 0x30]
mov dword [esp + ebp*4 + 0x24], edx
jmp 0x100a2e75
push esi
call fcn.1014fc08
add esp, 4
test eax, eax
je 0x100a3155
mov dword [esp + 0x14], 0
inc ebp
jmp 0x100a2e75
cmp ebp, 3
jl 0x100a3155
movzx eax, word [edi + 0xae]
cmp dword [esp + 0x24], eax
jne 0x100a313b
movzx ecx, word [edi + 0xac]
cmp dword [esp + 0x28], ecx
jne 0x100a313b
cmp dword [esp + 0x2c], 0xffff
jne 0x100a313b
push 2
push eax
mov ecx, edi
call fcn.10072ba0
mov ebp, eax
push str.subtract__
push ebp
mov ecx, edi
mov dword [esp + 0x1c], ebp
call fcn.100721a0
xor esi, esi
xor edx, edx
mov dword [esp + 0x10], esi
cmp dx, word [edi + 0xac]
jae 0x100a30bb
lea ecx, [ecx]
movzx eax, word [edi + 0xae]
push ebx
push eax
push 2
push ebp
call fcn.1015037a
xor ecx, ecx
add esp, 0x10
xor ebx, ebx
cmp cx, word [edi + 0xae]
jae 0x100a30a3
mov edx, esi
and edx, 7
lea eax, [edx + edx]
mov dword [esp + 0x20], eax
mov ebp, dword [edi + 0x98]
movzx edx, word [edi + 0xb6]
mov ecx, ebx
and ecx, 1
or ecx, dword [esp + 0x20]
mov eax, ebx
add ecx, ecx
shr ebp, cl
mov dword [esp + 0x18], ecx
movzx ecx, word [edi + 0x409dc]
sar esi, cl
sar eax, cl
mov ecx, dword [edi + 0x40860]
and ebp, 3
imul esi, edx
mov edx, dword [esp + 0x14]
add esi, eax
movzx eax, word [edx + ebx*2]
add esi, esi
push eax
add esi, esi
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov eax, dword [esp + 0x34]
lea edx, [esi + ebp]
movzx edx, word [eax + edx*2]
sub edx, ecx
test edx, edx
jle 0x100a3070
mov ebp, dword [edi + 0x98]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
movzx eax, word [edi + 0xb6]
shr ebp, cl
movzx ecx, word [edi + 0x409dc]
sar esi, cl
mov edx, ebx
sar edx, cl
mov ecx, dword [esp + 0x14]
imul esi, eax
mov eax, dword [edi + 0x40860]
add esi, edx
movzx edx, word [ecx + ebx*2]
add esi, esi
push edx
and ebp, 3
add esi, esi
mov dword [esp + 0x38], eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov eax, dword [esp + 0x34]
lea edx, [esi + ebp]
movzx eax, word [eax + edx*2]
sub eax, ecx
jmp 0x100a3072
xor eax, eax
mov edx, dword [edi + 0x98]
mov ecx, dword [esp + 0x18]
shr edx, cl
mov ecx, dword [esp + 0x34]
inc ebx
and edx, 3
add edx, esi
mov esi, dword [esp + 0x10]
mov word [ecx + edx*2], ax
movzx edx, word [edi + 0xae]
cmp ebx, edx
jl 0x100a2fb1
mov ebp, dword [esp + 0x14]
movzx eax, word [edi + 0xac]
mov ebx, dword [esp + 0x1c]
inc esi
cmp esi, eax
mov dword [esp + 0x10], esi
jl 0x100a2f80
push ebp
mov ecx, edi
call fcn.10072be0
push ebx
call fcn.10150cdf
xor eax, eax
mov dword [edi + 0x20200], eax
mov dword [edi + 0x20204], eax
mov dword [edi + 0x20208], eax
mov dword [edi + 0x2020c], eax
mov dword [edi + 0x20210], eax
mov dword [edi + 0x20214], eax
mov dword [edi + 0x20218], eax
mov dword [edi + 0x2021c], eax
mov dword [edi + 0x201fc], eax
mov eax, dword [edi + 0x46c8c]
add esp, 4
test eax, eax
je 0x100a3176
mov ecx, dword [edi + 0x46c90]
push 2
push 1
push 0x40
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x100a3176
push 0x102419c0
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], 6
call fcn.101525f9
or dword [edi + 4], 0x400
push ebx
call fcn.10150cdf
add esp, 4
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x20
ret 4
mov eax, dword [esp + 0x34]
push eax
push str._s_is_not_a_valid_PGM_file__n
call fcn.101536c6
add eax, 0x40
push eax
call fcn.101535aa
push ebx
call fcn.10150cdf
add esp, 0x10
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x20
ret 4