Function at 0x4084f9
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x444
mov eax, dword [0x4c3014]
xor eax, esp
mov dword [esp + 0x440], eax
push ebx
push ebp
push esi
xor ebx, ebx
mov ebp, ecx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push edx
mov dword [esp + 0x64], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x30], esi
cmp esi, 0xffffffff
jne 0x408541
xor al, al
jmp 0x408962
push edi
push 6
pop ecx
xor eax, eax
mov byte [esp + 0x13], bl
push ebx
mov edi, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov edi, ebx
push eax
push 4
lea eax, [esp + 0x50]
mov dword [esp + 0x30], edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x44]
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 + 0x44], edx
cmp edx, 0x61561
jne 0x408956
push ebx
lea eax, [esp + 0x2c]
push eax
push 4
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x48]
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 + 0x48], edx
cmp edx, 2
jne 0x408956
push ebx
push ebx
push 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [esp + 0x2c]
push eax
push 4
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x20]
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 ebx
or eax, ecx
shr edx, 8
push ebx
shl eax, 8
push 0x38
or edx, eax
push esi
mov dword [esp + 0x30], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [esp + 0x2c]
push eax
push 4
lea eax, [esp + 0x3c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x30]
mov edx, ecx
mov eax, ecx
mov dword [esp + 0x40], ebx
shr eax, 0x10
and edx, 0xff0000
or edx, eax
mov dword [esp + 0x2c], 1
mov eax, ecx
shr edx, 8
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shl eax, 8
or edx, eax
mov dword [esp + 0x30], edx
jbe 0x40891a
push 0x8000
mov dword [esp + 0x20], ebx
call fcn.0047c771
pop ecx
mov ecx, dword [esp + 0x2c]
mov ebp, eax
imul ecx, dword [esp + 0x20]
push ebx
push ebx
mov dword [esp + 0x44], ebp
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x30]
lea eax, [ecx*4 + 6]
push eax
mov dword [esp + 0x18], eax
call fcn.00484ab0
mov dword [esp + 0x3c], eax
pop ecx
test eax, eax
je 0x40883e
push ebx
lea ecx, [esp + 0x2c]
push ecx
push dword [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
add eax, 8
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
movzx esi, word [eax - 4]
mov ecx, edi
imul ecx, dword [esp + 0x20]
movzx edx, word [eax]
movzx eax, word [eax - 6]
add ecx, eax
mov eax, dword [esp + 0x14]
mov dword [ebp + ebx*4], ecx
add eax, 4
mov ecx, edi
mov dword [esp + 0x14], eax
imul ecx, dword [esp + 0x20]
add ecx, esi
mov dword [ebp + ebx*4 + 4], ecx
add ebx, 2
inc dword [esp + 0x40]
inc dword [esp + 0x18]
cmp dx, si
jne 0x4086fd
mov eax, dword [esp + 0x2c]
xor edx, edx
inc eax
mov ecx, ebp
imul eax, dword [esp + 0x20]
push ebx
mov dword [ebp + ebx*4], eax
call fcn.00407df5
mov eax, dword [esp + 0x1c]
xor ebx, ebx
mov edi, dword [esp + 0x28]
mov esi, ebx
add eax, eax
mov dword [esp + 0x18], esi
pop ecx
mov dword [esp + 0x1c], eax
je 0x408830
mov ebp, dword [esp + 0x34]
cmp edi, 0x100
jae 0x408828
mov eax, dword [esp + 0x3c]
push ebx
push ebx
push dword [eax + esi*4]
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
mov esi, dword [ecx + esi*4 + 4]
sub esi, dword [ecx + eax*4]
lea eax, [esi + 1]
push eax
call fcn.00484ab0
mov dword [esp + 0x1c], eax
pop ecx
test eax, eax
je 0x408815
push ebx
lea ecx, [esp + 0x2c]
push ecx
push esi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
push 8
mov byte [eax + esi], bl
call fcn.00484ab0
mov dword [esp + 0x28], eax
pop ecx
test eax, eax
je 0x408806
mov dword [eax], ebx
push esi
mov dword [eax + 4], ebx
call fcn.00484ab0
pop ecx
mov ecx, eax
mov eax, dword [esp + 0x24]
mov dword [eax], ecx
test ecx, ecx
je 0x408803
push esi
push dword [esp + 0x1c]
push ecx
call fcn.0047e230
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [eax + 4], esi
push dword [esp + 0x18]
mov dword [esp + edi*4 + 0x54], eax
inc edi
call fcn.00484888
pop ecx
mov esi, dword [esp + 0x14]
inc esi
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x1c]
jb 0x408776
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x24], edi
push dword [esp + 0x38]
call fcn.00484888
mov esi, dword [esp + 0x38]
pop ecx
push ebp
call fcn.0047c72e
inc dword [esp + 0x30]
mov eax, dword [esp + 0x44]
pop ecx
cmp eax, dword [esp + 0x30]
jb 0x40868e
mov ebp, dword [esp + 0x4c]
cmp edi, 1
jbe 0x40891a
lea eax, [edi - 1]
lea esi, [esp + 0x50]
mov dword [esp + 0x1c], eax
mov edi, eax
lea eax, [esi + 4]
mov dword [esp + 0x38], eax
mov eax, dword [eax]
push 0xb
push str.global_salt
mov eax, dword [eax]
push eax
mov dword [esp + 0x28], eax
call fcn.0047ef51
add esp, 0xc
test eax, eax
jne 0x4088ab
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
mov dword [ebp + 4], eax
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
call fcn.00462598
mov dword [ebp], eax
jmp 0x408909
mov edx, dword [esp + 0x1c]
mov ecx, ebx
mov eax, dword [edx + ecx*4]
mov ebp, 0x4b5b78
cmp eax, dword [ebp + ecx*4]
mov ebp, dword [esp + 0x4c]
jne 0x4088e0
inc ecx
cmp ecx, 4
jne 0x4088b1
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
mov dword [ebp + 0xc], eax
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
call fcn.00462598
mov dword [ebp + 8], eax
jmp 0x408909
push 0xe
push 0x4b5b8c
push edx
call fcn.0047ef51
add esp, 0xc
test eax, eax
jne 0x408909
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
mov dword [ebp + 0x14], eax
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
call fcn.00462598
mov dword [ebp + 0x10], eax
mov esi, dword [esp + 0x38]
sub edi, 1
jne 0x408871
mov edi, dword [esp + 0x24]
cmp dword [ebp + 0x10], ebx
je 0x40892e
cmp dword [ebp], ebx
je 0x40892e
mov byte [esp + 0x13], 1
cmp dword [ebp + 8], ebx
jne 0x408932
mov byte [esp + 0x13], bl
test edi, edi
je 0x408952
mov esi, dword [esp + ebx*4 + 0x50]
test esi, esi
je 0x40894d
push dword [esi]
call fcn.00484888
push esi
call fcn.00484888
pop ecx
pop ecx
inc ebx
cmp ebx, edi
jb 0x408936
mov esi, dword [esp + 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop edi
mov ecx, dword [esp + 0x44c]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047c71d
add esp, 0x444
ret