Function at 0x402310
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x4075ec]
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 0x402372
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ef4
mov esp, ebp
pop ebp
ret
mov edx, 0xf1e0
cmp word [ebp - 0x38], dx
jne 0x40235c
test byte [ebp - 0x34], 2
jne 0x402399
pop edi
pop esi
mov eax, 0x15
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ef4
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 0x40235c
mov edx, 0xf1ef
cmp word [ebp - 0x50], dx
jne 0x40235c
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 0x402418
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 0x402431
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 0x402448
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 0x402461
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 0x40247e
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 0x402683
cmp word [ebp - 0x4a], 0
jle 0x402497
cmp dword [esi + 4], 0
je 0x402683
cmp word [ebp - 0x46], 0
jle 0x4024a8
cmp dword [esi + 0xc], 0
je 0x402683
cmp word [ebp - 0x44], 0
jle 0x4024b9
cmp dword [esi + 0x10], 0
je 0x402683
test ax, ax
jle 0x4024c8
cmp dword [esi + 0x18], 0
je 0x402683
cmp word [ebp - 0x42], 0
jle 0x4024d9
cmp dword [esi + 0x14], 0
je 0x402683
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 0x40253d
push esi
call fcn.00401091
add esp, 4
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ef4
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 0x402570
lea esp, [esp]
mov edx, dword [esi + 4]
mov dword [edx + ecx*4], eax
add eax, 5
cmp byte [eax], 0
je 0x402566
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402560
movsx edx, word [ebp - 0x4a]
inc ecx
inc eax
cmp ecx, edx
jl 0x402550
movzx ecx, word [ebp - 0x48]
mov dword [esi + 8], eax
lea eax, [eax + ecx*8]
test eax, eax
je 0x40258e
mov edi, edi
mov edx, dword [eax]
cmp edx, dword [eax - 8]
jle 0x40258e
add eax, 0x80000
jne 0x402580
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x46]
jge 0x4025de
jmp 0x4025a0
mov edx, dword [esi + 0xc]
mov dword [edx + ecx*4], eax
add eax, 0x13
cmp byte [eax], 0
je 0x4025b6
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x4025b0
mov edx, dword [esi + 0xc]
mov edx, dword [edx + ecx*4]
xor edi, edi
inc eax
cmp di, word [edx + 0x10]
jge 0x4025d5
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 0x4025a0
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x44]
jge 0x402610
jmp 0x4025f0
mov edx, dword [esi + 0x10]
mov dword [edx + ecx*4], eax
add eax, 2
cmp byte [eax], 0
je 0x402606
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402600
movsx edx, word [ebp - 0x44]
inc ecx
inc eax
cmp ecx, edx
jl 0x4025f0
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x42]
jge 0x402640
lea ebx, [ebx]
mov edx, dword [esi + 0x14]
mov dword [edx + ecx*4], eax
add eax, 6
cmp byte [eax], 0
je 0x402636
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402630
movsx edx, word [ebp - 0x42]
inc ecx
inc eax
cmp ecx, edx
jl 0x402620
xor edx, edx
xor ecx, ecx
cmp dx, word [ebp - 0x40]
jge 0x402670
lea ebx, [ebx]
mov edx, dword [esi + 0x18]
mov dword [edx + ecx*4], eax
add eax, 4
cmp byte [eax], 0
je 0x402666
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x402660
movsx edx, word [ebp - 0x40]
inc ecx
inc eax
cmp ecx, edx
jl 0x402650
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402ef4
mov esp, ebp
pop ebp
ret
push esi
call fcn.00401091
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov eax, 0x10
pop ebx
call fcn.00402ef4
mov esp, ebp
pop ebp
ret