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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x570358
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5e8ea4]
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
cmp dword [0x5e9c98], 8
mov eax, 0x5e9c84
push 0
cmovae eax, dword [0x5e9c84]
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x34], ebx
cmp ebx, 0xffffffff
jne 0x45d7eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x5e9c98], 8
mov ecx, 0x5e9c84
push eax
cmovae ecx, dword [0x5e9c84]
push ecx
push str.____Failed_to_open:__s._Code__lu
call fcn.0045d370
add esp, 0xc
jmp 0x45da16
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x45da0f
mov esi, dword [ebp - 0x20]
mov eax, esi
or eax, dword [ebp - 0x1c]
je 0x45da0f
push esi
call fcn.0055016a
mov edi, eax
add esp, 4
mov dword [ebp - 0x30], edi
test edi, edi
je 0x45da0f
push esi
push 0
push edi
call fcn.005446b0
add esp, 0xc
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 0x20]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45da0f
mov eax, dword [ebp - 0x14]
xor ecx, ecx
cmp eax, dword [ebp - 0x20]
jne 0x45da0f
cmp ecx, dword [ebp - 0x1c]
jne 0x45da0f
push 0x5d6a9c
xor esi, esi
mov ebx, edi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov dword [ebp - 0x28], esi
call edi
mov ecx, eax
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x45d9d9
nop word [eax + eax]
sub ecx, ebx
sar ecx, 1
je 0x45d9b5
cmp ecx, 0x4000
ja 0x45d9b5
lea edi, [ecx + ecx]
lea ecx, [edi + 2]
call fcn.00457fc0
mov esi, eax
test esi, esi
je 0x45d9d6
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x24], edi
jae 0x45d8df
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
mov al, byte [edx + ebx]
mov byte [ecx + esi], al
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], edi
jb 0x45d8c7
cmp word [edi + esi - 2], 0xd
jne 0x45d8ee
xor eax, eax
mov word [edi + esi - 2], ax
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push 0x5d5eec
push esi
call edi
test eax, eax
jne 0x45d90b
push esi
call fcn.0054823a
jmp 0x45d9b2
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea ecx, [ebp - 0x4c]
call fcn.00449510
lea eax, [ebp - 0x4c]
mov dword [ebp - 4], 0
push eax
mov ecx, 0x5f0160
call fcn.0045daa0
mov ecx, esi
lea edi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x45d936
sub ecx, edi
sar ecx, 1
push ecx
push esi
mov ecx, eax
call fcn.0044a890
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x38]
cmp edx, 8
jb 0x45d98f
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45d985
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45da34
push edx
push ecx
call fcn.0052cac7
add esp, 8
inc dword [ebp - 0x28]
xor eax, eax
push esi
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
call fcn.0054823a
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
add esp, 4
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
test eax, eax
je 0x45d9d6
lea ebx, [ecx + 2]
push 0x5d6a9c
push ebx
call edi
mov ecx, eax
mov dword [ebp - 0x2c], eax
test ecx, ecx
jne 0x45d890
mov esi, dword [ebp - 0x28]
push dword [ebp - 0x30]
call fcn.0054823a
add esp, 4
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x5d6aa0
call fcn.0045fab0
push esi
mov ecx, eax
call fcn.0045db70
push eax
call fcn.0045fd70
add esp, 4
mov eax, 1
jmp 0x45da18
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
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.0052c886
mov esp, ebp
pop ebp
ret
call fcn.00548571
int3