Function at 0x1034973
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x10980dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x234], ebx
lea edi, [ebp - 0x230]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp ecx, ebx
jne 0x10349b5
mov ebx, 0x80070057
jmp 0x1034b28
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x10349ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jmp 0x1034a26
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
jmp 0x1034b28
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebx
push 0xffffffffffffffea
push eax
call edi
push 0
mov ebx, eax
lea eax, [ebp - 0x238]
push eax
push 0x16
lea eax, [ebp - 0x234]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1034a30
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1034b3b
jle 0x10349e8
jmp 0x10349de
cmp dword [ebp - 0x234], 0x6054b50
jne 0x1034c70
sub ebx, dword [ebp - 0x228]
push 0
push 0
push ebx
push dword [esi + 4]
call edi
lea eax, [ebp - 0x210]
push eax
movzx eax, word [ebp - 0x22c]
push 0
cdq
push 4
push edx
push eax
call fcn.0101e146
push edx
push eax
call fcn.010022b6
mov ebx, eax
test ebx, ebx
jl 0x1034b28
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x228]
push dword [ebp - 0x210]
call fcn.010340b7
mov ebx, eax
test ebx, ebx
jl 0x1034b28
mov edi, dword [ebp - 0x210]
test edi, edi
jbe 0x1034c70
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 8], eax
test eax, eax
jne 0x1034ac9
mov ebx, 0x8007000e
jmp 0x1034b28
mov ecx, dword [ebp - 0x228]
add edi, eax
lea edx, [eax + ecx]
mov dword [ebp - 0x21c], edi
cmp edx, edi
ja 0x1034c70
push 0
lea edx, [ebp - 0x238]
push edx
push ecx
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1034a1e
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x228]
and dword [ebp - 0x210], 0
add ecx, eax
mov dword [esi + 0xc], ecx
xor ecx, ecx
cmp cx, word [ebp - 0x22c]
jb 0x1034b48
movzx eax, word [ebp - 0x22c]
mov dword [esi + 0x10], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0100235f
leave
ret 8
mov ebx, 0x80004005
jmp 0x1034b28
mov eax, dword [ebp - 0x214]
cmp eax, dword [ebp - 0x21c]
ja 0x1034c70
mov edi, eax
add eax, 0x2e
cmp eax, dword [ebp - 0x21c]
ja 0x1034c70
cmp dword [edi], 0x2014b50
jne 0x1034c70
mov ecx, dword [ebp - 0x210]
mov edx, dword [esi + 0xc]
shl ecx, 2
mov dword [ecx + edx], edi
movzx edx, word [edi + 0x1c]
add eax, edx
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x214], eax
cmp eax, dword [ebp - 0x21c]
ja 0x1034c70
mov eax, dword [esi + 0xc]
add ecx, eax
mov eax, dword [ecx]
movzx eax, word [eax + 0x1c]
mov edx, 0x103
cmp ax, dx
jae 0x1034c70
xor edx, edx
xor ebx, ebx
cmp dx, ax
jae 0x1034bfe
mov edx, dword [ebp - 0x218]
mov eax, dword [esi + 0xc]
add edx, eax
mov dword [ebp - 0x218], edx
mov edx, dword [ecx]
movzx eax, bx
mov dl, byte [edx + eax + 0x2e]
cmp dl, 0x2f
jne 0x1034be4
push 0x5c
pop edx
jmp 0x1034be7
movsx edx, dl
mov word [ebp + eax*2 - 0x20c], dx
mov eax, dword [ebp - 0x218]
mov eax, dword [eax]
inc ebx
cmp bx, word [eax + 0x1c]
jb 0x1034bd1
movzx eax, bx
xor ecx, ecx
mov word [ebp + eax*2 - 0x20c], cx
lea eax, [ebp - 0x20c]
push eax
call fcn.01034077
test al, al
je 0x1034c70
push 0
push dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x14]
call fcn.010117c2
mov ebx, eax
test ebx, ebx
jl 0x1034b28
movzx ecx, word [edi + 0x1e]
add ecx, dword [ebp - 0x214]
movzx eax, word [edi + 0x20]
add ecx, eax
movzx eax, word [ebp - 0x22c]
inc dword [ebp - 0x210]
cmp dword [ebp - 0x210], eax
mov dword [ebp - 0x214], ecx
jge 0x1034b1e
jmp 0x1034b42
mov ebx, 0x80070570
jmp 0x1034b28