Function at 0x4055f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41fe59
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x11c]
push 0x104
push eax
push 0
mov dword [esp + 0x238], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x11c]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
add esp, 8
test edx, edx
je 0x40566a
mov edi, 0x42888c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x11c]
push ecx
push str._sposhash.dll
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.pos_hash
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4056dc
mov ecx, dword [esp + 0x238]
test ecx, ecx
je 0x4057e5
mov al, byte [ecx - 1]
test al, al
je 0x4057db
cmp al, 0xff
je 0x4057db
dec al
mov byte [ecx - 1], al
xor al, al
jmp 0x405893
mov esi, dword [esp + 0x238]
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test esi, esi
je 0x4056ee
mov eax, esi
push 0x426068
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x405733
test esi, esi
je 0x4057e5
mov al, byte [esi - 1]
test al, al
je 0x405722
cmp al, 0xff
je 0x405722
dec al
mov byte [esi - 1], al
xor al, al
jmp 0x405893
dec esi
push esi
call fcn.0041f590
add esp, 4
xor al, al
jmp 0x405893
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ebx
call ebp
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov esi, eax
lea edi, [esi + 1]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, eax
mov ecx, edi
mov dword [esp + 0x24], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push 0
rep stosb byte es:[edi], al
push ebx
call ebp
add esp, 0x20
xor ebp, ebp
test esi, esi
jle 0x40579b
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x10]
push ebx
push esi
push 1
lea ecx, [eax + ebp]
push ecx
call edi
sub esi, eax
add esp, 0x10
add ebp, eax
test esi, esi
jg 0x405782
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [esp + 0x14]
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0xa0]
add esp, 4
lea edx, [esp + 0x9c]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0x1c]
push edx
push ebp
rep stosd dword es:[edi], eax
push esi
call dword [esp + 0x24]
test eax, eax
jne 0x4057ec
jmp 0x4056ae
dec ecx
push ecx
call fcn.0041f590
add esp, 4
xor al, al
jmp 0x405893
lea eax, [esp + 0x1c]
push 8
lea ecx, [esp + 0xa0]
push eax
push ecx
call fcn.0041ee00
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov ebp, dword [esp + 0x244]
push 1
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40584e
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x10]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
test esi, esi
je 0x40585b
push esi
call fcn.0041f590
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40586a
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x238]
test ecx, ecx
je 0x405891
mov al, byte [ecx - 1]
test al, al
je 0x405887
cmp al, 0xff
je 0x405887
dec al
mov byte [ecx - 1], al
jmp 0x405891
dec ecx
push ecx
call fcn.0041f590
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x220
ret