Function at 0x40a8f4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
push edi
push dword [ebp + 0xc]
call fcn.00407676
mov esi, eax
pop ecx
mov dword [ebp - 0x60], esi
call fcn.004033d2
lea eax, [ebp - 0x38]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
movzx eax, ax
push eax
push dword [ebp + 0xc]
call fcn.00403d80
push 0
push dword [ebp + 8]
mov dword [ebp - 0x44], eax
call fcn.0040dc11
mov edi, eax
add esp, 0x14
mov dword [ebp - 8], edi
test edi, edi
je 0x40aeac
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
test al, al
je 0x40aeac
mov ebx, 0x200
push ebx
call fcn.00430ca4
push edi
push 1
mov esi, eax
push ebx
push esi
call fcn.0040d938
mov eax, 0xaa55
add esp, 0x14
cmp word [esi + 0x1fe], ax
je 0x40a991
push edi
call fcn.0040d97e
push esi
call fcn.00430bc7
pop ecx
pop ecx
push 2
pop eax
jmp 0x40aeaf
movzx eax, byte [esi + 0x12]
movzx ecx, byte [esi + 0x11]
movzx edi, byte [esi + 0xd]
movzx edx, word [esi + 0xe]
shl eax, 8
or eax, ecx
movzx ecx, word [esi + 0x16]
mov dword [ebp - 0x10], ecx
movzx cx, byte [esi + 0x10]
movzx ecx, cx
movzx ecx, cx
mov dword [ebp - 0x4c], ecx
imul ecx, dword [ebp - 0x10]
mov dword [ebp - 0x54], eax
shl eax, 5
mov dword [ebp - 0x14], edi
movzx edx, dx
mov edi, 0x1ff
add eax, edi
mov dword [ebp - 0x28], ecx
add ecx, edx
shr eax, 9
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x2c], eax
jne 0x40aa2c
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x2c]
push eax
push edx
push dword [ebp - 8]
mov dword [ebp - 0x50], eax
call fcn.0040a878
imul eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x4c]
imul ecx, dword [ebp - 0x10]
shl eax, 4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
add eax, 0xfffffffe
imul eax, dword [ebp - 0x14]
add eax, ecx
add eax, dword [ebp - 0x1c]
add esp, 0xc
and dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x38]
shl ecx, 9
lea eax, [ecx + eax - 1]
xor edx, edx
div ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x38]
add eax, 0x1ff
cdq
and edx, edi
add eax, edx
sar eax, 9
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x10]
shl eax, 9
push eax
mov dword [ebp - 0x34], eax
call fcn.00430ca4
mov edi, eax
mov eax, dword [ebp - 0x1c]
shl eax, 9
push 0
push eax
push dword [ebp - 8]
mov dword [ebp - 0x5c], eax
call fcn.0040d963
push dword [ebp - 8]
push 1
push dword [ebp - 0x34]
push edi
call fcn.0040d938
movzx cx, byte [esi + 0x14]
movzx dx, byte [esi + 0x13]
mov eax, dword [esi + 0x20]
shl cx, 8
or cx, dx
add esp, 0x20
movzx ecx, cx
test eax, eax
jne 0x40aaad
movzx edx, cx
mov dword [ebp - 0x30], edx
test cx, cx
jne 0x40aab5
mov dword [ebp - 0x30], eax
push esi
call fcn.00430bc7
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x1c]
pop ecx
sub eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
add eax, ecx
xor edx, edx
div dword [ebp - 0x14]
cmp eax, 0xff5
jae 0x40aadf
mov dword [ebp - 0x18], 0xc
jmp 0x40aaef
cmp eax, 0xfff5
sbb eax, eax
and eax, 0xfffffff0
add eax, 0x20
mov dword [ebp - 0x18], eax
push 0x20
pop ecx
sub ecx, dword [ebp - 0x18]
or edx, 0xffffffff
shr edx, cl
mov ecx, dword [ebp - 0x10]
xor eax, eax
shl ecx, 0xc
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
cmp ecx, eax
jbe 0x40ab77
mov ecx, eax
shr ecx, 3
movzx esi, byte [edi + ecx + 3]
movzx eax, byte [edi + ecx + 2]
shl esi, 8
or esi, eax
movzx eax, byte [edi + ecx + 1]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + edi]
shl esi, 8
or esi, eax
mov eax, dword [ebp - 0xc]
mov ecx, eax
and ecx, 7
sar esi, cl
test edx, esi
jne 0x40ab60
cmp dword [ebp - 0x30], 0
je 0x40ab55
inc dword [ebp - 0x20]
jmp 0x40ab64
xor ecx, ecx
inc ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x30], ecx
jmp 0x40ab64
and dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x24]
je 0x40ab77
add eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x10]
jb 0x40ab15
cmp eax, dword [ebp - 0x10]
jb 0x40ab93
push edi
call fcn.00430bc7
push dword [ebp - 8]
call fcn.0040d97e
pop ecx
pop ecx
push 4
jmp 0x40a98b
xor edx, edx
div dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x28]
add ecx, ecx
sub esi, ecx
add esi, dword [ebp - 0x2c]
push ebx
add esi, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x20], eax
call fcn.00430ca4
pop ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
test ecx, ecx
jbe 0x40ac48
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0x14]
add eax, esi
shl eax, 9
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jbe 0x40ac38
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], ecx
push 0
push 0
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x68]
push eax
push ebx
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push dword [ebp - 0x30]
push dword [ebp - 8]
call fcn.0040d963
push dword [ebp - 8]
push 1
push ebx
push dword [ebp - 0xc]
call fcn.0040d94d
add dword [ebp - 0x30], ebx
add esp, 0x1c
add esi, ebx
dec dword [ebp - 0x3c]
jne 0x40abec
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x58]
add dword [ebp - 0x10], ecx
add eax, ecx
dec dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
jne 0x40abdc
push dword [ebp - 0xc]
call fcn.00430bc7
mov edx, dword [ebp - 0x24]
pop ecx
mov ecx, dword [ebp - 0x20]
mov eax, ecx
imul eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], ecx
add ecx, edx
mov dword [ebp - 0x58], ecx
imul ecx, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
cmp eax, ecx
jmp 0x40ad00
mov ecx, eax
and ecx, 7
shr eax, 3
inc dword [ebp - 0x10]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x58]
jne 0x40ac8f
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x10], ecx
lea edx, [edi + eax + 2]
lea ecx, [edi + eax + 1]
lea esi, [edi + eax + 3]
add eax, edi
mov dword [ebp - 0x40], eax
movzx eax, byte [esi]
shl eax, 8
mov dword [ebp - 0x30], edx
movzx edx, byte [edx]
or eax, edx
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x3c], ecx
movzx ecx, byte [ecx]
shl eax, 8
or eax, ecx
mov ecx, dword [ebp - 0x40]
movzx ecx, byte [ecx]
shl eax, 8
or eax, ecx
mov ecx, dword [ebp - 0x44]
shl edx, cl
not edx
and eax, edx
mov edx, dword [ebp - 0x10]
shl edx, cl
mov ecx, dword [ebp - 0x40]
or eax, edx
mov edx, dword [ebp - 0x3c]
mov byte [ecx], al
mov ecx, eax
shr ecx, 8
mov byte [edx], cl
mov edx, dword [ebp - 0x30]
mov ecx, eax
shr eax, 0x18
and al, 0xf
mov byte [esi], al
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x18]
shr ecx, 0x10
cmp eax, dword [ebp - 0x24]
mov byte [edx], cl
mov dword [ebp - 0xc], eax
jb 0x40ac73
mov eax, dword [ebp - 0x4c]
test eax, eax
jbe 0x40ad3a
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], eax
push 0
push esi
push dword [ebp - 8]
call fcn.0040d963
push dword [ebp - 8]
push 1
push dword [ebp - 0x34]
push edi
call fcn.0040d94d
add esi, dword [ebp - 0x34]
add esp, 0x1c
dec dword [ebp - 0x4c]
jne 0x40ad16
mov eax, dword [ebp - 0x50]
push 0
shl eax, 9
push eax
push dword [ebp - 8]
call fcn.0040d963
mov eax, dword [ebp - 0x54]
and dword [ebp - 0x10], 0
shr eax, 4
add esp, 0xc
mov byte [ebp - 1], 0
mov dword [ebp - 0x5c], eax
test eax, eax
jbe 0x40ae6a
push dword [ebp - 8]
push 1
push ebx
push edi
call fcn.0040d938
add esp, 0x10
and dword [ebp - 0xc], 0
mov eax, edi
mov cl, byte [eax]
test cl, cl
je 0x40ad98
cmp cl, 0xe5
je 0x40ad98
inc dword [ebp - 0xc]
add eax, 0x20
cmp dword [ebp - 0xc], 0x10
jb 0x40ad7c
jmp 0x40ae55
mov eax, dword [ebp - 0xc]
shl eax, 5
push 0x20
lea esi, [eax + edi]
push 0
push esi
call fcn.00432990
push 0xb
push str.SYSLOAD_SYS
push esi
call fcn.00433d80
add esp, 0x18
lea eax, [ebp - 0x78]
push eax
mov byte [esi + 0xb], 7
mov byte [esi + 0xc], 0x18
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x76]
mov edx, dword [ebp - 0x70]
shl eax, 9
and ecx, 0xf
shl ecx, 5
sub eax, 0x7601
and eax, 0xfffffe00
or eax, ecx
mov ecx, dword [ebp - 0x72]
and ecx, 0x1f
or eax, ecx
mov ecx, dword [ebp - 0x6e]
and ecx, 0x3f
shl edx, 6
or ecx, edx
mov edx, dword [ebp - 0x6c]
movzx eax, ax
shr edx, 1
shl ecx, 5
and edx, 0x1f
or ecx, edx
movzx ecx, cx
mov word [esi + 0x18], ax
mov word [esi + 0x12], ax
mov word [esi + 0x10], ax
mov ax, word [ebp - 0x20]
push 1
mov word [esi + 0x16], cx
mov word [esi + 0xe], cx
mov word [esi + 0x1a], ax
mov eax, dword [ebp - 0x38]
push 0xfffffe00
push dword [ebp - 8]
mov dword [esi + 0x1c], eax
call fcn.0040d963
push dword [ebp - 8]
push 1
push ebx
push edi
call fcn.0040d94d
add esp, 0x1c
mov byte [ebp - 1], 1
cmp dword [ebp - 0xc], 0x10
jb 0x40ae6a
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x5c]
jb 0x40ad67
mov eax, dword [ebp - 0x20]
push dword [ebp - 0x64]
mov ecx, dword [ebp - 0x60]
add eax, 0xfffffffe
imul eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x1c]
mov edx, dword [ecx]
add eax, dword [ebp - 0x28]
push 0
add eax, dword [ebp - 0x2c]
push eax
shl eax, 9
push eax
push dword [ebp - 8]
call dword [edx + 0xc]
push dword [ebp - 8]
call fcn.0040d97e
cmp byte [ebp - 1], 0
pop ecx
jne 0x40aea8
push 5
jmp 0x40a98b
xor eax, eax
jmp 0x40aeaf
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret