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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a998
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x5caea4]
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 [0x5cbbb8], 8
mov eax, 0x5cbba4
push 0
cmovae eax, dword [0x5cbba4]
push 0
push 3
push 0
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x5c], ebx
cmp ebx, 0xffffffff
jne 0x455f0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x5cbbb8], 8
mov ecx, 0x5cbba4
push eax
cmovae ecx, dword [0x5cbba4]
push ecx
push str.____Failed_to_open:__s._Code__lu
call fcn.004554d0
add esp, 0xc
jmp 0x4561b6
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4561af
mov esi, dword [ebp - 0x28]
mov eax, esi
or eax, dword [ebp - 0x24]
je 0x4561af
push esi
call fcn.0053aaf8
mov edi, eax
add esp, 4
mov dword [ebp - 0x58], edi
test edi, edi
je 0x4561af
push esi
push 0
push edi
call fcn.00530530
add esp, 0xc
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 0x28]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4561af
mov eax, dword [ebp - 0x14]
xor ecx, ecx
cmp eax, dword [ebp - 0x28]
jne 0x4561af
cmp ecx, dword [ebp - 0x24]
jne 0x4561af
push 0x5bef2c
xor esi, esi
mov ebx, edi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov dword [ebp - 0x30], esi
call edi
mov ecx, eax
mov dword [ebp - 0x34], eax
test ecx, ecx
je 0x456174
nop word [eax + eax]
sub ecx, ebx
sar ecx, 1
je 0x456150
cmp ecx, 0x4000
ja 0x456150
lea esi, [ecx + ecx]
lea ecx, [esi + 2]
call fcn.00455260
mov edi, eax
test edi, edi
je 0x456171
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x2c], esi
jae 0x455fff
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
mov al, byte [edx + ebx]
mov byte [ecx + edi], al
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], esi
jb 0x455fe7
cmp word [esi + edi - 2], 0xd
jne 0x45600e
xor eax, eax
mov word [esi + edi - 2], ax
push 0x5bef30
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x456141
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea ecx, [ebp - 0x4c]
call fcn.00448f50
lea eax, [ebp - 0x4c]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
call fcn.00456c90
mov eax, dword [0x5d1a64]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x60], eax
cmp esi, eax
je 0x4560a8
cmp dword [esi + 0x24], 8
lea edx, [esi + 0x10]
mov ebx, dword [edx + 0x10]
jb 0x45606b
mov edx, dword [edx]
cmp dword [ebp - 0x38], 8
lea ecx, [ebp - 0x4c]
mov eax, dword [ebp - 0x3c]
cmovae ecx, dword [ebp - 0x4c]
cmp ebx, eax
mov dword [ebp - 0x1c], eax
cmovb eax, ebx
mov dword [ebp - 0x18], ebx
push eax
call fcn.00452920
add esp, 4
test eax, eax
jne 0x4560a1
mov eax, dword [ebp - 0x3c]
cmp ebx, eax
jbe 0x45609d
or eax, 0xffffffff
jmp 0x4560a1
sbb eax, eax
neg eax
shr eax, 0x1f
test al, al
je 0x4560cb
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push ecx
push eax
push ecx
call fcn.00458690
push eax
add eax, 0x10
push eax
push esi
lea eax, [ebp - 0x54]
push eax
call fcn.004586f0
mov esi, dword [ebp - 0x54]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4560d0
sub eax, edx
lea ecx, [esi + 0x28]
sar eax, 1
push eax
push edi
call fcn.0044a1c0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x38]
cmp edx, 8
jb 0x45612a
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x456120
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4561d4
push edx
push ecx
call fcn.00518d68
add esp, 8
xor eax, eax
mov dword [ebp - 0x3c], 0
inc dword [ebp - 0x30]
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
push edi
call fcn.005340ba
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
add esp, 4
mov ecx, dword [ebp - 0x34]
mov eax, ecx
test eax, eax
je 0x456171
lea ebx, [ecx + 2]
push 0x5bef2c
push ebx
call edi
mov ecx, eax
mov dword [ebp - 0x34], eax
test ecx, ecx
jne 0x455fb0
mov esi, dword [ebp - 0x30]
push dword [ebp - 0x58]
call fcn.005340ba
add esp, 4
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x5bef34
mov ecx, 0x5d0248
call fcn.00457b70
push esi
mov ecx, eax
call fcn.00456230
push eax
call fcn.00457e30
add esp, 4
mov eax, 1
jmp 0x4561b8
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.00518b27
mov esp, ebp
pop ebp
ret
call fcn.005343f1
int3