Function at 0x30083321
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov esi, 0x100
push esi
lea eax, [ebp - 0x138]
push 0
push eax
mov ebx, ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x38]
rep stosd dword es:[edi], eax
lea edi, [ebx + 0x10c]
push edi
push dword [edi + 4]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], edi
call fcn.30082414
lea eax, [ebp - 0x20]
push eax
mov ecx, edi
call fcn.30082546
push dword [ebp - 0x10]
mov ecx, edi
push dword [ebp - 0x14]
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x14]
push eax
call fcn.300825f6
mov eax, dword [ebx + 0x124]
push 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x120]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x300833c3
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x300833c3
call edi
jmp 0x3008360f
push 0
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0x138]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x30083609
cmp dword [ebp - 8], esi
jne 0x30083609
mov eax, dword [ebp - 0x138]
mov edx, dword [ebp - 0x3c]
push 0x36
pop ecx
mov dword [ebx + 0x118], eax
lea edi, [ebx + 0x10]
lea esi, [ebp - 0x130]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x128]
push 6
mov edi, eax
pop ecx
lea esi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [eax]
mov esi, dword [ebx + 0x12c]
or esi, eax
mov ecx, dword [ebp - 0x40]
mov dword [ebx + 0x140], ecx
mov dword [ebx + 0x144], edx
je 0x30083562
push eax
mov ecx, ebx
call fcn.3008219b
xor edi, edi
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x30083623
mov eax, dword [ebx + 0x13c]
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebx + 0x138]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x3008348f
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x3008348f
call esi
push eax
call fcn.30043dd4
cmp eax, edi
jmp 0x30083617
push edi
lea eax, [ebp - 8]
push eax
push dword [ebx + 0x130]
push dword [ebx + 0x148]
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x300834bb
mov eax, dword [ebp - 8]
cmp eax, dword [ebx + 0x130]
je 0x300834d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.30043dd4
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x30083623
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], edi
jl 0x30083623
mov eax, dword [ebx + 0x130]
cmp eax, 4
mov edx, dword [ebx + 0x148]
jb 0x3008361c
mov ebx, dword [edx]
mov ecx, ebx
imul ecx, ecx, 0x18
add eax, 0xfffffffc
add edx, 4
cmp eax, ecx
jae 0x3008350f
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
jl 0x30083623
cmp dword [ebp - 0x1c], ebx
jae 0x30083623
push 6
mov esi, edx
pop ecx
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x2c]
add edx, 0x18
or eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], edx
je 0x30083545
mov dword [ebp - 4], 0x8004022d
jmp 0x30083554
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x38]
push eax
call fcn.30083147
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x1c]
cmp dword [ebp - 4], 0
jge 0x3008351b
jmp 0x30083623
mov edi, ecx
mov esi, edx
mov eax, esi
or eax, edi
je 0x30083623
push 0
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebx + 0x11c]
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x30083595
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x30083609
push 0
lea eax, [ebp - 8]
push eax
push 0x18
lea eax, [ebp - 0x38]
push eax
push dword [ebx + 0x11c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x300835b7
cmp dword [ebp - 8], 0x18
je 0x300835d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x30083623
mov dword [ebp - 4], 0x8004022d
cmp dword [ebp - 4], 0
jl 0x30083623
mov eax, dword [ebp - 0x2c]
or eax, dword [ebp - 0x30]
jne 0x300835f5
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x38]
push eax
call fcn.30083147
cmp edi, dword [ebp - 0x28]
jne 0x300835fe
cmp esi, dword [ebp - 0x24]
jne 0x300835fe
xor esi, esi
xor edi, edi
jmp 0x30083566
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
jmp 0x30083566
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.30043dd4
test eax, eax
mov dword [ebp - 4], eax
jl 0x30083623
mov dword [ebp - 4], 0x8004022d
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret