Function at 0x542e70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
mov esi, ecx
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 8], edi
cmp edi, 0xffffffff
jne 0x542eb1
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
push 0
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [ebp - 0x10]
push edx
push 4
lea ebx, [esi + 8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [ebx]
imul ebx, dword [esi + 4]
xor ecx, ecx
mov eax, ebx
mov edx, 0x2c
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0056cd68
add esp, 4
test eax, eax
je 0x542f2b
mov dword [eax], ebx
add eax, 4
dec ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], eax
js 0x542f2d
mov ecx, dword [ebp - 0xc]
call fcn.00541380
add dword [ebp - 0xc], 0x2c
dec ebx
jns 0x542f17
mov eax, dword [ebp - 0x24]
jmp 0x542f2d
xor eax, eax
cmp dword [esi + 8], 0
mov dword [esi + 0xc], eax
mov dword [ebp - 0xc], 0
jbe 0x542f9f
lea ecx, [ecx]
xor ebx, ebx
cmp dword [esi + 4], ebx
jbe 0x542f93
push 0
lea ecx, [ebp - 0x10]
push ecx
push 2
lea edx, [ebp + 8]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [esi + 4]
imul edi, dword [ebp - 0xc]
add edi, ebx
imul edi, edi, 0x2c
add edi, dword [esi + 0xc]
je 0x542f8a
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
push ebx
mov ecx, edi
call edx
mov ecx, dword [ebp - 0xc]
mov eax, dword [edi]
mov edx, dword [eax + 0x18]
push ecx
mov ecx, edi
call edx
mov ax, word [ebp + 8]
mov word [edi + 0x1c], ax
mov edi, dword [ebp - 8]
inc ebx
cmp ebx, dword [esi + 4]
jb 0x542f47
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [esi + 8]
jb 0x542f40
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
mov edi, dword [esi + 8]
mov dword [esi + 0x2c], edx
mov eax, 0xaaaaaaab
mul ecx
mov dword [esi + 0x10], ecx
mov ecx, edx
mov eax, 0xaaaaaaab
mul edi
shr ecx, 1
shr edx, 1
mov dword [esi + 0x1c], edx
imul edx, ecx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x14], edi
mov edi, edx
xor ecx, ecx
mov eax, edi
mov edx, 0x2c
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0056cd68
add esp, 4
test eax, eax
je 0x543022
mov dword [eax], edi
add eax, 4
dec edi
mov dword [ebp - 0x24], eax
mov ebx, eax
js 0x543024
nop
mov ecx, ebx
call fcn.00541380
add ebx, 0x2c
dec edi
jns 0x543010
mov eax, dword [ebp - 0x24]
jmp 0x543024
xor eax, eax
cmp dword [esi + 0x1c], 0
mov dword [esi + 0x30], eax
mov dword [ebp - 0xc], 0
jbe 0x54327e
mov dword [ebp - 4], 2
nop
cmp dword [esi + 0x18], 0
mov dword [ebp - 8], 0
jbe 0x54326a
mov edi, 2
mov eax, dword [ebp - 4]
add eax, 0xfffffffe
push eax
lea ebx, [edi - 2]
push ebx
mov ecx, esi
call fcn.00542240
mov ecx, dword [ebp - 4]
add ecx, 0xfffffffe
mov dword [ebp - 0x28], eax
push ecx
lea eax, [edi - 1]
push eax
mov ecx, esi
call fcn.00542240
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
add eax, 0xfffffffe
push eax
push edi
call fcn.00542240
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
dec eax
push eax
push ebx
call fcn.00542240
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
dec eax
push eax
lea eax, [edi - 1]
push eax
call fcn.00542240
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
dec eax
push eax
push edi
call fcn.00542240
mov ecx, dword [ebp - 4]
push ecx
push ebx
mov ecx, esi
mov dword [ebp - 0x1c], eax
call fcn.00542240
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x20], eax
push ebx
lea eax, [edi - 1]
push eax
call fcn.00542240
push ebx
push edi
mov dword [ebp - 0x24], eax
call fcn.00542240
mov ebx, eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x543257
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x543257
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x543257
cmp dword [ebp - 0x14], 0
je 0x543257
cmp dword [ebp - 0x18], 0
je 0x543257
cmp dword [ebp - 0x1c], 0
je 0x543257
cmp dword [ebp - 0x20], 0
je 0x543257
cmp dword [ebp - 0x24], 0
je 0x543257
test ebx, ebx
je 0x543257
cmp byte [eax + 0x1c], 1
je 0x54320b
cmp byte [eax + 0x1d], 0
jne 0x54320b
cmp byte [edx + 0x1c], 1
je 0x54320b
cmp byte [edx + 0x1d], 0
jne 0x54320b
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, dword [ebp - 0x14]
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, dword [ebp - 0x18]
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, dword [ebp - 0x1c]
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, dword [ebp - 0x20]
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, dword [ebp - 0x24]
call fcn.0053db20
test eax, eax
jne 0x54320b
mov ecx, ebx
call fcn.0053db20
test eax, eax
jne 0x54320b
mov edx, dword [esi + 0x18]
imul edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
mov eax, dword [esi + 0x30]
add edx, ebx
imul edx, edx, 0x2c
xor ecx, ecx
mov word [edx + eax + 0x1c], cx
mov ecx, dword [esi + 0x18]
imul ecx, dword [ebp - 0xc]
add ecx, ebx
imul ecx, ecx, 0x2c
add ecx, dword [esi + 0x30]
push ebx
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0x18]
imul ecx, eax
add ecx, ebx
imul ecx, ecx, 0x2c
add ecx, dword [esi + 0x30]
push eax
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
jmp 0x54325a
mov ecx, dword [esi + 0x18]
mov ebx, dword [ebp - 0xc]
mov edx, dword [esi + 0x30]
imul ecx, ebx
add ecx, dword [ebp - 8]
mov eax, 1
imul ecx, ecx, 0x2c
mov word [ecx + edx + 0x1c], ax
mov ecx, dword [esi + 0x18]
mov eax, dword [ebp - 8]
imul ecx, ebx
add ecx, eax
imul ecx, ecx, 0x2c
add ecx, dword [esi + 0x30]
push eax
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [esi + 0x18]
imul ecx, ebx
add ecx, dword [ebp - 8]
push ebx
imul ecx, ecx, 0x2c
add ecx, dword [esi + 0x30]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
call edx
mov ebx, dword [ebp - 8]
inc ebx
add edi, 3
mov dword [ebp - 8], ebx
cmp ebx, dword [esi + 0x18]
jb 0x543056
mov eax, dword [ebp - 0xc]
add dword [ebp - 4], 3
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [esi + 0x1c]
jb 0x543040
pop ebx
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 4