Function at 0x414812
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x414e7c
cmp dword [ebp + 0xc], ebx
je 0x414e7c
mov eax, dword [esi + 0x128]
cmp eax, 0xffffffff
je 0x414868
push dword [ebp + 0x18]
lea ecx, [ebp + 8]
push ecx
push dword [ebp + 0x10]
mov dword [ebp + 8], ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 0x14]
cmp ecx, ebx
je 0x414e86
mov edx, dword [ebp + 8]
mov dword [ecx], edx
jmp 0x414e86
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x414895
cmp dword [edi], ebx
jne 0x414887
cmp dword [edi + 4], ebx
jne 0x414887
cmp dword [edi + 8], ebx
jne 0x414887
cmp dword [edi + 0xc], ebx
jne 0x414887
cmp dword [edi + 0x10], ebx
je 0x414895
push ebx
lea eax, [edi + 0xc]
push eax
push dword [edi + 8]
push esi
call fcn.0041381a
cmp dword [ebp + 0x10], ebx
jne 0x4148b2
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x4148a3
mov dword [eax], ebx
cmp edi, ebx
je 0x4148aa
mov dword [edi + 4], ebx
xor eax, eax
inc eax
jmp 0x414e86
mov eax, dword [esi + 0x11c]
mov ebx, dword [esi + 0x130]
mov eax, dword [eax + 0xc]
cmp ebx, eax
mov edi, dword [esi + 0x114]
ja 0x414e84
jne 0x4148e8
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4148db
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4148aa
and dword [eax + 4], 0
jmp 0x4148aa
mov eax, dword [esi + 0x118]
mov eax, dword [eax + 4]
mov ecx, dword [edi + 0x11c]
and dword [ebp + 8], 0
shl eax, 4
mov dword [ebp - 0xc], eax
mov eax, dword [eax + ecx + 0xc]
mov ecx, dword [ebp + 0x10]
add ecx, ebx
cmp ecx, eax
jbe 0x414913
sub eax, ebx
mov dword [ebp + 0x10], eax
mov cl, byte [edi + 0x142]
mov eax, 0x200
shl eax, cl
xor edx, edx
mov dword [ebp - 8], eax
mov eax, ebx
div dword [ebp - 8]
mov eax, ebx
sub eax, edx
mov dword [ebp - 0x38], edx
xor edx, edx
div dword [ebp - 8]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x10]
add ebx, eax
mov eax, ebx
div dword [ebp - 8]
mov ecx, edx
test ecx, ecx
mov dword [ebp - 0x20], eax
je 0x414951
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov eax, dword [edi + 0x11c]
mov eax, dword [edx + eax + 0xc]
mov ebx, dword [ebp - 8]
xor edx, edx
div ebx
test edx, edx
mov dword [ebp - 0x1c], eax
je 0x41496f
inc dword [ebp - 0x1c]
test ecx, ecx
mov dword [ebp - 0x3c], ecx
jne 0x414979
mov dword [ebp - 0x3c], ebx
push ebx
call fcn.00417a63
test eax, eax
mov dword [ebp - 4], eax
jne 0x4149a4
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414990
and dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414e84
and dword [eax + 4], 0
jmp 0x414e84
shl ebx, 4
push ebx
call fcn.00417a63
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x4149be
push dword [ebp - 4]
call fcn.004179da
jmp 0x414986
mov eax, dword [esi + 0x12c]
and dword [ebp - 0x2c], 0
push 4
push dword [0x468014]
mov dword [ebp - 0x24], eax
lea eax, [edi + 0x124]
push eax
call fcn.00437c6b
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
test eax, eax
jne 0x414a23
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax]
add eax, dword [edi + 0x15c]
push 0
push 0
push eax
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x120]
call ebx
cmp dword [esi + 0x108], 0
jne 0x414b0a
mov eax, dword [ebp - 0x1c]
lea eax, [eax*4 + 4]
push eax
mov dword [ebp - 0x34], eax
call fcn.00417a63
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x414a57
push dword [ebp - 0x18]
call fcn.004179da
jmp 0x4149b4
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add eax, ecx
test word [eax + 4], 0x300
jne 0x414aab
mov edx, dword [ebp - 0x1c]
lea ecx, [edx + 1]
xor eax, eax
test ecx, ecx
jbe 0x414b01
xor ecx, ecx
cmp eax, edx
jae 0x414a88
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], ecx
jmp 0x414a9e
mov edx, dword [edi + 0x11c]
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebx + edx + 0xc]
mov ebx, dword [ebp - 0x14]
mov dword [ebx + eax*4], edx
mov edx, dword [ebp - 0x1c]
add ecx, dword [ebp - 8]
inc eax
lea ebx, [edx + 1]
cmp eax, ebx
jb 0x414a7c
jmp 0x414b01
mov ecx, dword [edi + 0x15c]
add ecx, dword [eax]
push 0
add ecx, dword [ebp - 0x2c]
push 0
push ecx
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
push dword [edi + 0x120]
call ebx
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
test dword [ecx + eax + 4], 0x10000
je 0x414b01
mov eax, dword [ebp - 0x24]
dec eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x14]
call fcn.00413d00
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x108], eax
mov eax, dword [ebp - 8]
add eax, 3
push eax
call fcn.00417a63
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x414b4b
push dword [ebp - 0x18]
call fcn.004179da
push dword [ebp - 4]
call fcn.004179da
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x414b38
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
cmp eax, ebx
je 0x414e84
mov dword [eax + 4], ebx
jmp 0x414e84
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x10], eax
jae 0x414e0f
push 0x10
pop eax
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], eax
xor eax, eax
cmp dword [ebp - 0x28], eax
jne 0x414bec
mov ebx, dword [ebp - 0x10]
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
push eax
push eax
mov eax, dword [esi + 0x108]
shl ebx, 2
mov eax, dword [ebx + eax]
add eax, dword [edx + ecx]
add eax, dword [edi + 0x15c]
add eax, dword [ebp - 0x2c]
push eax
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
add eax, ecx
add eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp eax, ecx
mov eax, dword [esi + 0x108]
push 0
jbe 0x414bc9
mov ecx, dword [eax + ecx*4]
lea edx, [ebp - 0x30]
push edx
jmp 0x414bd1
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebx + eax + 0x40]
sub ecx, dword [ebx + eax]
push ecx
push dword [ebp - 0x18]
push dword [edi + 0x120]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x414e49
mov eax, dword [esi + 0x108]
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
shl ebx, 2
mov ecx, dword [ebx + eax + 4]
sub ecx, dword [ebx + eax]
push ecx
mov ecx, dword [ebp - 0x40]
add edx, ecx
mov edx, dword [eax + edx*4]
sub edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x18]
push edx
push dword [ebp - 4]
call fcn.00437870
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
test dword [ecx + eax + 4], 0x10000
je 0x414c52
mov edx, dword [ebp - 0x24]
mov eax, dword [esi + 0x108]
mov ecx, dword [ebp - 0x10]
add ecx, edx
push ecx
add eax, ebx
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
push ecx
push dword [ebp - 4]
call fcn.00413d00
add esp, 0xc
mov eax, dword [ebp - 0x1c]
dec eax
cmp dword [ebp - 0x10], eax
jne 0x414c74
mov eax, dword [edi + 0x11c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax + 0xc]
xor edx, edx
div dword [ebp - 8]
test edx, edx
je 0x414c74
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x108]
lea ecx, [ebx + eax]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
cmp eax, dword [ebp - 8]
je 0x414d3b
mov ecx, dword [edi + 0x11c]
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + ecx + 4]
test cx, 0x200
je 0x414cf5
push eax
push dword [ebp - 4]
push dword [ebp - 0x14]
call fcn.00437870
mov eax, dword [ebp - 0x14]
add esp, 0xc
test byte [eax], 0x34
je 0x414ce6
call fcn.00413dfe
mov eax, dword [0x46d664]
test eax, eax
je 0x414d3b
mov ecx, dword [esi + 0x108]
add ebx, ecx
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
push ecx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp - 4]
call eax
jmp 0x414d3b
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
jmp 0x414d2b
test cx, 0x100
je 0x414d3b
mov ecx, dword [ebp - 0x14]
mov byte [ecx], 8
mov eax, dword [esi + 0x108]
add eax, ebx
mov edx, dword [eax + 4]
sub edx, dword [eax]
inc ecx
push edx
push dword [ebp - 4]
push ecx
call fcn.00437870
mov eax, dword [esi + 0x108]
add ebx, eax
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
add esp, 0xc
inc eax
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call fcn.00417436
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x44]
jne 0x414d91
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x38]
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x4c], eax
jbe 0x414d7f
mov ebx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
add eax, ebx
push eax
push dword [ebp + 0xc]
call fcn.00437870
mov eax, dword [ebp - 0x4c]
add dword [ebp + 8], eax
mov eax, dword [ebp - 8]
sub eax, ebx
sub ebx, dword [ebp - 8]
add dword [esi + 0x130], eax
add esp, 0xc
add dword [ebp + 0x10], ebx
jmp 0x414df6
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x38]
push ebx
add eax, ecx
push eax
push dword [ebp + 0xc]
jmp 0x414de1
mov ecx, dword [ebp - 0x20]
dec ecx
cmp eax, ecx
mov ecx, dword [ebp + 8]
jne 0x414dac
mov eax, dword [ebp - 0x3c]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414dd7
mov ebx, dword [ebp - 0x3c]
jmp 0x414dba
mov eax, dword [ebp - 8]
cmp dword [ebp + 0x10], eax
mov eax, dword [ebp + 0xc]
jbe 0x414dd7
mov ebx, dword [ebp - 8]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.00437870
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
sub dword [ebp + 0x10], ebx
jmp 0x414df6
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp - 4]
add ecx, eax
push ecx
call fcn.00437870
add dword [ebp + 8], ebx
add dword [esi + 0x130], ebx
add esp, 0xc
and dword [ebp + 0x10], 0
mov eax, dword [ebp - 0x28]
inc eax
and eax, 0xf
inc dword [ebp - 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jb 0x414b69
push dword [ebp - 0x14]
call fcn.004179da
push dword [ebp - 0x18]
call fcn.004179da
push dword [ebp - 4]
call fcn.004179da
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414e33
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4148aa
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x4148aa
push dword [ebp - 0x14]
call fcn.004179da
push dword [ebp - 0x18]
call fcn.004179da
push dword [ebp - 4]
call fcn.004179da
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x414e6d
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x414e84
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x414e84
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14