Function at 0x10022e80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1004a5b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
push 0x38
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.MSVCR100.dll_memset
mov esi, dword [sym.imp.MSVCR100.dll_fseek]
push 0
push 0
push ebx
call esi
push ebx
push 1
lea ecx, [ebp - 0x3c]
push 0x38
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
mov edx, 0xf1e0
add esp, 0x28
cmp word [ebp - 0x38], dx
je 0x10022ee6
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035a92
mov esp, ebp
pop ebp
ret
test byte [ebp - 0x34], 2
jne 0x10022f02
pop edi
pop esi
mov eax, 0x15
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035a92
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x3c]
push 0
push eax
push ebx
call esi
push ebx
xor eax, eax
push 1
lea ecx, [ebp - 0x54]
push 0x16
push ecx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov word [ebp - 0x40], ax
call dword [sym.imp.MSVCR100.dll_fread]
mov edx, 0xf1ef
add esp, 0x1c
cmp word [ebp - 0x50], dx
jne 0x10022ed0
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
mov ax, word [ebp - 0x4a]
add esp, 4
mov dword [edi], esi
test ax, ax
je 0x10022f7f
movzx ecx, ax
add ecx, ecx
add ecx, ecx
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi + 4], eax
mov ax, word [ebp - 0x46]
test ax, ax
je 0x10022f9c
movzx edx, ax
add edx, edx
add edx, edx
push edx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi + 0xc], eax
mov ax, word [ebp - 0x44]
test ax, ax
je 0x10022fb9
movzx eax, ax
add eax, eax
add eax, eax
push eax
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi + 0x10], eax
mov ax, word [ebp - 0x42]
test ax, ax
je 0x10022fd6
movzx ecx, ax
add ecx, ecx
add ecx, ecx
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [edi + 0x14], eax
mov ax, word [ebp - 0x40]
test ax, ax
je 0x10022ff7
movzx edx, ax
add edx, edx
add edx, edx
push edx
call dword [sym.imp.MSVCR100.dll_malloc]
mov dword [edi + 0x18], eax
mov ax, word [ebp - 0x40]
add esp, 4
test esi, esi
je 0x100231f3
cmp word [ebp - 0x4a], 0
jbe 0x10023010
cmp dword [edi + 4], 0
je 0x100231f3
cmp word [ebp - 0x46], 0
jbe 0x10023021
cmp dword [edi + 0xc], 0
je 0x100231f3
cmp word [ebp - 0x44], 0
jbe 0x10023032
cmp dword [edi + 0x10], 0
je 0x100231f3
test ax, ax
je 0x10023041
cmp dword [edi + 0x18], 0
je 0x100231f3
cmp word [ebp - 0x42], 0
jbe 0x10023052
cmp dword [edi + 0x14], 0
je 0x100231f3
mov eax, dword [ebp - 0x54]
mov dword [esi], eax
mov ecx, dword [ebp - 0x50]
mov dword [esi + 4], ecx
mov edx, dword [ebp - 0x4c]
mov dword [esi + 8], edx
mov eax, dword [ebp - 0x48]
mov dword [esi + 0xc], eax
mov ecx, dword [ebp - 0x44]
mov dword [esi + 0x10], ecx
mov dx, word [ebp - 0x40]
mov word [esi + 0x14], dx
mov eax, dword [ebp - 0x54]
mov ecx, dword [edi]
push ebx
add eax, 0xffffffea
push eax
add ecx, 0x16
push 1
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
mov eax, dword [edi]
xor edx, edx
add esp, 0x10
add eax, 0x16
xor ecx, ecx
cmp dx, word [ebp - 0x4a]
jae 0x100230c0
nop
mov edx, dword [edi + 4]
mov dword [edx + ecx*4], eax
add eax, 5
cmp byte [eax], 0
je 0x100230b6
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x100230b0
movzx edx, word [ebp - 0x4a]
inc ecx
inc eax
cmp ecx, edx
jl 0x100230a0
movzx ecx, word [ebp - 0x48]
lea esi, [eax + ecx*8]
mov dword [edi + 8], eax
test esi, esi
je 0x100230e8
mov edi, edi
mov edx, dword [esi]
cmp edx, dword [esi - 8]
jle 0x100230e8
add esi, 0x80000
mov eax, 0xffff
mov word [ebp - 0x48], ax
jne 0x100230d0
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x58], eax
cmp cx, word [ebp - 0x46]
jae 0x10023155
mov edx, dword [edi + 0xc]
mov dword [edx + eax*4], esi
add esi, 0x13
cmp byte [esi], 0
je 0x10023109
inc esi
cmp byte [esi], 0
jne 0x10023103
mov ecx, dword [edi + 0xc]
mov edx, dword [ecx + eax*4]
xor ecx, ecx
inc esi
xor ebx, ebx
cmp cx, word [edx + 0x10]
jae 0x10023149
lea ebx, [ebx]
push esi
call fcn.10023840
lea edx, [esi + 2]
push edx
call fcn.10023850
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 0x58]
mov edx, dword [eax + ecx*4]
movzx eax, word [edx + 0x10]
inc ebx
add esp, 8
add esi, 6
cmp ebx, eax
jl 0x10023120
mov eax, ecx
movzx ecx, word [ebp - 0x46]
inc eax
mov dword [ebp - 0x58], eax
cmp eax, ecx
jl 0x100230f5
xor edx, edx
xor eax, eax
cmp dx, word [ebp - 0x44]
jae 0x10023180
nop
mov ecx, dword [edi + 0x10]
mov dword [ecx + eax*4], esi
add esi, 2
cmp byte [esi], 0
je 0x10023176
mov edi, edi
inc esi
cmp byte [esi], 0
jne 0x10023170
movzx edx, word [ebp - 0x44]
inc eax
inc esi
cmp eax, edx
jl 0x10023160
xor ecx, ecx
xor eax, eax
cmp cx, word [ebp - 0x42]
jae 0x100231b0
lea ebx, [ebx]
mov edx, dword [edi + 0x14]
mov dword [edx + eax*4], esi
add esi, 6
cmp byte [esi], 0
je 0x100231a6
mov edi, edi
inc esi
cmp byte [esi], 0
jne 0x100231a0
movzx ecx, word [ebp - 0x42]
inc eax
inc esi
cmp eax, ecx
jl 0x10023190
xor edx, edx
xor eax, eax
cmp dx, word [ebp - 0x40]
jae 0x100231e0
lea ebx, [ebx]
mov ecx, dword [edi + 0x18]
mov dword [ecx + eax*4], esi
add esi, 4
cmp byte [esi], 0
je 0x100231d6
mov edi, edi
inc esi
cmp byte [esi], 0
jne 0x100231d0
movzx edx, word [ebp - 0x40]
inc eax
inc esi
cmp eax, edx
jl 0x100231c0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10035a92
mov esp, ebp
pop ebp
ret
push edi
call fcn.10022e00
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov eax, 0x10
pop ebx
call fcn.10035a92
mov esp, ebp
pop ebp
ret