Function at 0x402300
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x4078e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0x38
lea eax, [ebp - 0x3c]
push 0
push eax
mov dword [ebp - 0x58], edi
call sub.MSVCR100.dll_memset
mov ebx, dword [sym.imp.MSVCR100.dll_fseek]
push 0
push 0
push edi
call ebx
push edi
push 1
lea ecx, [ebp - 0x3c]
push 0x38
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x28
test eax, eax
jne 0x402362
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ee4
mov esp, ebp
pop ebp
ret
mov edx, 0xf1e0
cmp word [ebp - 0x38], dx
jne 0x40234c
test byte [ebp - 0x34], 2
jne 0x402389
pop edi
pop esi
mov eax, 0x15
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ee4
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x3c]
push 0
push eax
push edi
call ebx
push edi
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]
add esp, 0x1c
test eax, eax
je 0x40234c
mov edx, 0xf1ef
cmp word [ebp - 0x50], dx
jne 0x40234c
mov ebx, dword [sym.imp.MSVCR100.dll_malloc]
xor eax, eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x54]
push eax
call ebx
mov edi, eax
mov ax, word [ebp - 0x4a]
add esp, 4
mov dword [esi], edi
test ax, ax
jle 0x402408
movsx ecx, ax
add ecx, ecx
add ecx, ecx
push ecx
call ebx
add esp, 4
mov dword [esi + 4], eax
mov ax, word [ebp - 0x46]
test ax, ax
jle 0x402421
movsx edx, ax
add edx, edx
add edx, edx
push edx
call ebx
add esp, 4
mov dword [esi + 0xc], eax
mov ax, word [ebp - 0x44]
test ax, ax
jle 0x402438
cwde
add eax, eax
add eax, eax
push eax
call ebx
add esp, 4
mov dword [esi + 0x10], eax
mov ax, word [ebp - 0x42]
test ax, ax
jle 0x402451
movsx ecx, ax
add ecx, ecx
add ecx, ecx
push ecx
call ebx
add esp, 4
mov dword [esi + 0x14], eax
mov ax, word [ebp - 0x40]
test ax, ax
jle 0x40246e
movsx edx, ax
add edx, edx
add edx, edx
push edx
call ebx
mov dword [esi + 0x18], eax
mov ax, word [ebp - 0x40]
add esp, 4
test edi, edi
je 0x402673
cmp word [ebp - 0x4a], 0
jle 0x402487
cmp dword [esi + 4], 0
je 0x402673
cmp word [ebp - 0x46], 0
jle 0x402498
cmp dword [esi + 0xc], 0
je 0x402673
cmp word [ebp - 0x44], 0
jle 0x4024a9
cmp dword [esi + 0x10], 0
je 0x402673
test ax, ax
jle 0x4024b8
cmp dword [esi + 0x18], 0
je 0x402673
cmp word [ebp - 0x42], 0
jle 0x4024c9
cmp dword [esi + 0x14], 0
je 0x402673
mov eax, dword [ebp - 0x54]
mov dword [edi], eax
mov ecx, dword [ebp - 0x50]
mov dword [edi + 4], ecx
mov edx, dword [ebp - 0x4c]
mov dword [edi + 8], edx
mov eax, dword [ebp - 0x48]
mov dword [edi + 0xc], eax
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x58]
mov dword [edi + 0x10], ecx
mov dx, word [ebp - 0x40]
mov word [edi + 0x14], dx
mov edi, dword [ebp - 0x54]
mov ecx, dword [esi]
push eax
add edi, 0xffffffea
push edi
add ecx, 0x16
push 1
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, edi
jae 0x40252d
push esi
call fcn.004010a0
add esp, 4
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ee4
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
xor edx, edx
add eax, 0x16
xor ecx, ecx
cmp dx, word [ebp - 0x4a]
jge 0x402560
lea esp, [esp]
mov edx, dword [esi + 4]
mov dword [edx + ecx*4], eax
add eax, 5
cmp byte [eax], 0
je 0x402556
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402550
movsx edx, word [ebp - 0x4a]
inc ecx
inc eax
cmp ecx, edx
jl 0x402540
movzx ecx, word [ebp - 0x48]
mov dword [esi + 8], eax
lea eax, [eax + ecx*8]
test eax, eax
je 0x40257e
mov edi, edi
mov edx, dword [eax]
cmp edx, dword [eax - 8]
jle 0x40257e
add eax, 0x80000
jne 0x402570
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x46]
jge 0x4025ce
jmp 0x402590
mov edx, dword [esi + 0xc]
mov dword [edx + ecx*4], eax
add eax, 0x13
cmp byte [eax], 0
je 0x4025a6
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x4025a0
mov edx, dword [esi + 0xc]
mov edx, dword [edx + ecx*4]
xor edi, edi
inc eax
cmp di, word [edx + 0x10]
jge 0x4025c5
mov edx, dword [esi + 0xc]
mov edx, dword [edx + ecx*4]
movsx edx, word [edx + 0x10]
lea edx, [edx + edx*2]
lea eax, [eax + edx*2]
movsx edx, word [ebp - 0x46]
inc ecx
cmp ecx, edx
jl 0x402590
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x44]
jge 0x402600
jmp 0x4025e0
mov edx, dword [esi + 0x10]
mov dword [edx + ecx*4], eax
add eax, 2
cmp byte [eax], 0
je 0x4025f6
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x4025f0
movsx edx, word [ebp - 0x44]
inc ecx
inc eax
cmp ecx, edx
jl 0x4025e0
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x42]
jge 0x402630
lea ebx, [ebx]
mov edx, dword [esi + 0x14]
mov dword [edx + ecx*4], eax
add eax, 6
cmp byte [eax], 0
je 0x402626
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402620
movsx edx, word [ebp - 0x42]
inc ecx
inc eax
cmp ecx, edx
jl 0x402610
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x40]
jge 0x402660
lea ebx, [ebx]
mov edx, dword [esi + 0x18]
mov dword [edx + ecx*4], eax
add eax, 4
cmp byte [eax], 0
je 0x402656
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402650
movsx edx, word [ebp - 0x40]
inc ecx
inc eax
cmp ecx, edx
jl 0x402640
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ee4
mov esp, ebp
pop ebp
ret
push esi
call fcn.004010a0
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov eax, 0x10
pop ebx
call fcn.00402ee4
mov esp, ebp
pop ebp
ret