Function at 0x481580
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b290c
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x5f8800]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, 0xa
lea edi, [ecx + 0x185ab4]
mov word [ebp - 0x104], ax
mov esi, edi
mov ebx, 0x12c
mov ecx, dword [esi]
test ecx, ecx
je 0x4815d3
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi], 0
add esi, 4
sub ebx, 1
jne 0x4815c7
push 0x78
lea eax, [ebp - 0x100]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
push 0x78
lea eax, [ebp - 0x88]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
push dword [ebp + 8]
lea eax, [ebp - 0x100]
push str.contents_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push str.contents
lea eax, [ebp - 0x88]
push 0x78
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
push 0x5c7568
lea eax, [ebp - 0x88]
push 0x78
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
push 0x5c7568
lea eax, [ebp - 0x88]
push 0x78
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
add esp, 0x48
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x88]
push 0x78
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
push str..txt
lea eax, [ebp - 0x88]
push 0x78
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
add esp, 0x18
lea eax, [ebp - 0x88]
push ebx
push ebx
push 3
push ebx
push ebx
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x108], ebx
cmp esi, 0xffffffff
je 0x4816b1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x5c45dc
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
add esp, 0xc
test eax, eax
jne 0x4817b2
lea esi, [ebx + 1]
push esi
call fcn.005aa4da
push esi
mov ebx, eax
push 0
push ebx
mov dword [ebp - 0x110], ebx
call sub.VCRUNTIME140.dll_memset
push dword [ebp - 0x10c]
push 1
push dword [ebp - 0x108]
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
push dword [ebp - 0x10c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
push 0x114
call fcn.005aa520
add esp, 0x28
mov dword [ebp - 0x108], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x48173e
lea ecx, [ebp - 0x104]
push ecx
push ebx
mov ecx, eax
call fcn.00587a70
mov ebx, eax
jmp 0x481740
xor ebx, ebx
mov ecx, ebx
mov dword [ebp - 4], 0xffffffff
call fcn.00587b30
mov esi, eax
test esi, esi
je 0x481798
push 0x1c
call fcn.005aa520
add esp, 4
mov dword [ebp - 0x108], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x48177d
push 0
push esi
push 0
mov ecx, eax
call fcn.00586d00
jmp 0x48177f
xor eax, eax
mov ecx, ebx
mov dword [ebp - 4], 0xffffffff
mov dword [edi], eax
call fcn.00587b30
mov esi, eax
add edi, 4
test esi, esi
jne 0x481754
test ebx, ebx
je 0x4817a4
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
push dword [ebp - 0x110]
call fcn.005aa4e3
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret 4