Function at 0x408160
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x8434
call fcn.004bef90
push ebp
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov edi, ecx
push edx
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x24], ebp
cmp ebp, 0xffffffff
jne 0x4081a1
pop edi
xor al, al
pop ebp
add esp, 0x8434
ret
push ebx
push esi
xor esi, esi
lea eax, [esp + 0x18]
push esi
push eax
push 4
lea eax, [esp + 0x48]
mov dword [esp + 0x28], esi
xorps xmm0, xmm0
xor bl, bl
push eax
movups xmmword [edi], xmm0
push ebp
movq qword [edi + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x3c]
mov edx, ecx
and edx, 0xff0000
mov eax, ecx
shr eax, 0x10
or edx, eax
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shr edx, 8
shl eax, 8
or edx, eax
mov dword [esp + 0x3c], edx
cmp edx, 0x61561
jne 0x4085f1
push esi
lea eax, [esp + 0x1c]
push eax
push 4
lea eax, [esp + 0x4c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x40]
mov edx, ecx
and edx, 0xff0000
mov eax, ecx
shr eax, 0x10
or edx, eax
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shr edx, 8
shl eax, 8
or edx, eax
mov dword [esp + 0x40], edx
cmp edx, 2
jne 0x4085f1
push esi
push esi
push 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x18]
push esi
push eax
push 4
lea eax, [esp + 0x20]
push eax
push ebp
call ebx
mov ecx, dword [esp + 0x14]
mov edx, ecx
mov eax, ecx
and edx, 0xff0000
shr eax, 0x10
or edx, eax
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
push esi
or eax, ecx
shr edx, 8
push esi
shl eax, 8
push 0x38
or edx, eax
push ebp
mov dword [esp + 0x24], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [esp + 0x1c]
push eax
push 4
lea eax, [esp + 0x34]
push eax
push ebp
call ebx
mov ecx, dword [esp + 0x28]
mov edx, ecx
mov eax, ecx
mov dword [esp + 0x30], esi
shr eax, 0x10
and edx, 0xff0000
or edx, eax
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shr edx, 8
shl eax, 8
or edx, eax
mov eax, 1
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], eax
jbe 0x4085af
nop
imul eax, dword [esp + 0x14]
xor ebx, ebx
push ebx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x28]
lea edi, [eax*4 + 6]
push edi
call fcn.004a9d98
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
je 0x408468
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, dword [esp + 0x24]
xor esi, esi
mov edi, dword [esp + 0x20]
imul ebp, dword [esp + 0x14]
add edi, 8
movzx edx, word [edi - 4]
lea esi, [esi + 1]
movzx eax, word [edi - 6]
lea edi, [edi + 4]
movzx ecx, word [edi - 4]
add eax, ebp
inc dword [esp + 0x30]
mov dword [esp + ebx*4 + 0x444], eax
lea eax, [edx + ebp]
mov dword [esp + ebx*4 + 0x448], eax
add ebx, 2
cmp cx, dx
jne 0x408342
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x444]
inc eax
xor edx, edx
imul eax, dword [esp + 0x14]
push ebx
mov dword [esp + ebx*4 + 0x448], eax
call fcn.00407830
lea eax, [esi + esi]
add esp, 4
mov esi, dword [esp + 0x1c]
xor ebp, ebp
mov dword [esp + 0x38], eax
test eax, eax
je 0x408458
nop dword [eax + eax]
cmp esi, 0x100
jae 0x408458
mov edi, dword [esp + ebp*4 + 0x444]
push 0
push 0
push edi
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [esp + ebp*4 + 0x448]
sub esi, edi
lea eax, [esi + 1]
push eax
call fcn.004a9d98
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408449
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push ebx
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 8
mov byte [ebx + esi], 0
call fcn.004a9d98
mov edi, eax
add esp, 4
test edi, edi
je 0x408431
xorps xmm0, xmm0
push esi
movq qword [edi], xmm0
call fcn.004a9d98
push esi
push ebx
push eax
mov dword [edi], eax
call fcn.004a5830
add esp, 0x10
mov dword [edi + 4], esi
mov esi, dword [esp + 0x1c]
push ebx
mov dword [esp + esi*4 + 0x48], edi
inc esi
mov dword [esp + 0x20], esi
call fcn.004a9b70
add esp, 4
jmp 0x40844d
mov esi, dword [esp + 0x1c]
inc ebp
cmp ebp, dword [esp + 0x38]
jb 0x4083b0
push dword [esp + 0x20]
call fcn.004a9b70
mov ebp, dword [esp + 0x30]
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
inc eax
mov dword [esp + 0x24], eax
cmp ecx, dword [esp + 0x28]
jb 0x4082f0
cmp esi, 1
jbe 0x4085ab
mov ebp, dword [esp + 0x34]
lea ebx, [esp + 0x44]
dec esi
mov dword [esp + 0x20], esi
nop word [eax + eax]
lea eax, [ebx + 4]
mov esi, str.global_salt
mov dword [esp + 0x38], eax
mov edi, 7
mov eax, dword [eax]
mov ecx, dword [eax]
mov edx, ecx
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x408504
add edx, 4
add esi, 4
sub edi, 4
jae 0x4084b7
mov ax, word [edx]
cmp ax, word [esi]
jne 0x408504
mov al, byte [edx + 2]
cmp al, byte [esi + 2]
jne 0x408504
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ebx, dword [eax]
push edi
mov dword [ebp + 4], edi
call fcn.004a9d98
mov esi, eax
add esp, 4
test esi, esi
je 0x4084fc
push edi
push ebx
push esi
call fcn.004a5830
add esp, 0xc
mov dword [ebp], esi
jmp 0x408594
mov edx, ecx
mov esi, 0x4cec00
mov edi, 0xc
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x40854a
add edx, 4
add esi, 4
sub edi, 4
jae 0x408510
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ebx, dword [eax]
push edi
mov dword [ebp + 0xc], edi
call fcn.004a9d98
mov esi, eax
add esp, 4
test esi, esi
je 0x408545
push edi
push ebx
push esi
call fcn.004a5830
add esp, 0xc
mov dword [ebp + 8], esi
jmp 0x408594
mov edx, 0x4cec14
mov esi, 0xa
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x408594
add ecx, 4
add edx, 4
sub esi, 4
jae 0x408554
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x408594
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ebx, dword [eax]
push edi
mov dword [ebp + 0x14], edi
call fcn.004a9d98
mov esi, eax
add esp, 4
test esi, esi
je 0x408591
push edi
push ebx
push esi
call fcn.004a5830
add esp, 0xc
mov dword [ebp + 0x10], esi
sub dword [esp + 0x20], 1
mov ebx, dword [esp + 0x38]
jne 0x4084a0
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
cmp dword [edi + 0x10], 0
je 0x4085c5
cmp dword [edi], 0
je 0x4085c5
cmp dword [edi + 8], 0
mov byte [esp + 0x13], 1
jne 0x4085ca
mov byte [esp + 0x13], 0
xor edi, edi
test esi, esi
je 0x4085ed
mov ebx, dword [esp + edi*4 + 0x44]
test ebx, ebx
je 0x4085e8
push dword [ebx]
call fcn.004a9b70
push ebx
call fcn.004a9b70
add esp, 8
inc edi
cmp edi, esi
jb 0x4085d0
mov bl, byte [esp + 0x13]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, bl
pop ebx
pop edi
pop ebp
add esp, 0x8434
ret