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

Disassembly:
push 0xffffffffffffffff
push 0x4f498d
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e4ce0]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov ebx, dword [esp + 0xe8]
mov esi, dword [esp + 0xec]
mov edi, ecx
cmp byte [edi + 8], 0xaa
je 0x4532b8
mov byte [0], 0x78
push esi
push ebx
mov byte [esp + 0x1f], 0
call fcn.00456880
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x45336c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
jne 0x4532f5
push eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.004661e0
mov al, 1
jmp 0x45361c
cmp ebp, 0xffffffff
jne 0x453373
test esi, esi
je 0x45335d
lea ecx, [esp + 0x20]
call fcn.00451c20
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], 0
call fcn.00453240
mov edx, dword [esi]
mov eax, dword [esp + 0x2c]
mov edx, dword [edx + 0x10]
push eax
mov ecx, esi
call edx
mov edi, dword [esi]
mov ecx, ebx
call fcn.00453f00
push eax
mov eax, dword [edi + 0x28]
push str.filename
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_get_file_size
mov ecx, esi
call eax
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], ebp
call fcn.00451e70
mov ecx, dword [esp + 0x18]
push 0
push ecx
call fcn.004661e0
add esp, 8
xor al, al
jmp 0x45361f
lea edx, [ebp + 4]
push edx
mov ecx, edi
call fcn.00451610
mov ecx, dword [edi + 0x14]
add ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ecx
push edx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45341e
test esi, esi
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0xc]
mov byte [eax + ecx], 0
je 0x45360c
lea ecx, [esp + 0x20]
call fcn.00451c20
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], 1
call fcn.00453240
mov edx, dword [esi]
mov eax, dword [esp + 0x2c]
mov edx, dword [edx + 0x10]
push eax
mov ecx, esi
call edx
mov edi, dword [esi]
mov ecx, ebx
call fcn.00453f00
push eax
mov eax, dword [edi + 0x28]
push str.filename
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_read_data_from_file
mov ecx, esi
call eax
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00451e70
jmp 0x45360c
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x453495
test esi, esi
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0xc]
mov byte [ecx + edx], 0
je 0x45360c
mov edi, dword [esi]
push ebp
call fcn.00452f30
add esp, 4
push eax
mov eax, dword [edi + 0x28]
push str.filesize
mov ecx, esi
call eax
mov ecx, dword [esp + 0x1c]
mov edi, dword [esi]
push ecx
call fcn.00452f30
mov edx, dword [edi + 0x28]
add esp, 4
push eax
push str.bytes_received
mov ecx, esi
call edx
mov edi, dword [esi]
mov ecx, ebx
call fcn.00453f00
push eax
mov eax, dword [edi + 0x28]
push str.filename
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_read_the_entire_file
mov ecx, esi
call eax
jmp 0x45360c
add dword [edi + 0x14], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0xc]
mov byte [eax + ecx], 0
mov esi, dword [edi + 0xc]
movzx eax, byte [esi]
or ebp, 0xffffffff
cmp eax, ebp
jne 0x4534f7
movzx edx, byte [esi + 1]
cmp edx, 0xfffffffe
jne 0x4534f7
lea ecx, [esp + 0x50]
call fcn.00442c90
mov ebx, 2
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], ebx
call fcn.004547e0
mov ecx, dword [edi + 0x14]
mov edx, dword [edi + 0xc]
lea eax, [esp + 0x20]
push eax
push ecx
push edx
push 0xfde9
mov byte [esp + 0xf0], 3
push 0x4b0
jmp 0x453549
cmp eax, 0xfffffffe
jne 0x453596
movzx eax, byte [esi + 1]
cmp eax, ebp
jne 0x453596
lea ecx, [esp + 0x50]
call fcn.00442c90
mov ebx, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0xe0], ebx
call fcn.004547e0
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
push 0xfde9
mov byte [esp + 0xf0], 5
push 0x4b1
lea ecx, [esp + 0x64]
call fcn.0044d450
mov ecx, edi
call fcn.00451240
lea ecx, [esp + 0x20]
call fcn.004c06c0
push eax
lea ecx, [esp + 0x24]
call fcn.004c4070
push eax
mov ecx, edi
call fcn.00451890
lea ecx, [esp + 0x20]
mov byte [esp + 0xe0], bl
call fcn.00454dd0
lea ecx, [esp + 0x50]
mov dword [esp + 0xe0], ebp
call fcn.00442cb0
jmp 0x453607
cmp dword [edi + 0x14], 3
jle 0x453607
cmp byte [esi], 0xef
jne 0x453607
cmp byte [esi + 1], 0xbb
jne 0x453607
cmp byte [esi + 2], 0xbf
jne 0x453607
lea ecx, [esp + 0x3c]
call fcn.004547e0
mov ecx, dword [edi + 0x14]
sub ecx, 3
push ecx
add esi, 3
push esi
lea ecx, [esp + 0x44]
mov dword [esp + 0xe8], 6
call fcn.00454fa0
mov ecx, edi
call fcn.00451240
lea ecx, [esp + 0x3c]
call fcn.004c06c0
push eax
lea ecx, [esp + 0x40]
call fcn.004c4070
push eax
mov ecx, edi
call fcn.00451890
lea ecx, [esp + 0x3c]
mov dword [esp + 0xe0], ebp
call fcn.00454dd0
mov byte [esp + 0x17], 1
mov edx, dword [esp + 0x18]
push 0
push edx
call fcn.004661e0
mov al, byte [esp + 0x1f]
add esp, 8
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.004d99c4
add esp, 0xd0
ret 8