Function at 0x409b00
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x4778bd
mov eax, dword fs:[0]
push eax
sub esp, 0xf8
mov eax, dword [0x536400]
xor eax, esp
mov dword [esp + 0xf4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x536400]
xor eax, esp
push eax
lea eax, [esp + 0x10c]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x11c]
mov esi, dword [esp + 0x120]
mov edi, ecx
cmp byte [edi + 0x10], 0xaa
je 0x409b58
mov byte [0], 0x78
lea ecx, [esp + 0x20]
mov byte [esp + 0x17], 0
call fcn.0042bd20
push esi
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x28]
push ebx
push ecx
mov dword [esp + 0x124], 0
call fcn.0041c830
add esp, 0x10
test al, al
je 0x409c21
mov edx, dword [esp + 0x24]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
jne 0x409bbb
lea ecx, [esp + 0x20]
mov dword [esp + 0x114], 0xffffffff
call fcn.0042bd80
mov al, 1
jmp 0x409ece
cmp ebp, 0xffffffff
jne 0x409c3c
test esi, esi
je 0x409c21
lea ecx, [esp + 0x2c]
call fcn.004089c0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], 1
call fcn.00409ae0
mov ecx, dword [esp + 0x40]
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, esi
call edx
mov edi, dword [esi]
mov ecx, ebx
call fcn.004072a0
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_when_loading_string_from_file
mov ecx, esi
call eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], 0
call fcn.00408bf0
lea ecx, [esp + 0x20]
mov dword [esp + 0x114], 0xffffffff
call fcn.0042bd80
xor al, al
jmp 0x409ece
lea ecx, [ebp + 4]
push ecx
mov ecx, edi
call fcn.004084f0
test al, al
jne 0x409c6e
test esi, esi
je 0x409c21
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Out_of_memory_reading_file_into_string_buffer
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push ebp
push str.fileSize
mov ecx, esi
call eax
jmp 0x409c21
mov eax, dword [edi + 0x1c]
add eax, dword [edi + 0x14]
push esi
lea ecx, [esp + 0x23]
push ecx
lea edx, [esp + 0x20]
push edx
push ebp
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0
call fcn.0042c260
test al, al
jne 0x409cd0
test esi, esi
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov byte [ecx + edx], al
je 0x409eb6
mov edi, dword [esi]
mov ecx, ebx
call fcn.004072a0
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
jmp 0x409eb6
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x409d47
test esi, esi
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov byte [ecx + edx], 0
je 0x409eb6
mov edi, dword [esi]
push ebp
call fcn.00409860
add esp, 4
push eax
mov eax, dword [edi + 0x28]
push str.filesize
mov ecx, esi
call eax
mov ecx, dword [esp + 0x18]
mov edi, dword [esi]
push ecx
call fcn.00409860
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.004072a0
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 0x409eb6
add dword [edi + 0x1c], eax
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x14]
mov byte [eax + ecx], 0
mov esi, dword [edi + 0x14]
movzx eax, byte [esi]
cmp eax, 0xffffffff
jne 0x409da4
movzx edx, byte [esi + 1]
cmp edx, 0xfffffffe
jne 0x409da4
lea ecx, [esp + 0x58]
call fcn.0040cd60
mov bl, 2
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], bl
call fcn.0040a5a0
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
lea eax, [esp + 0x2c]
push eax
push ecx
push edx
push 0xfde9
mov byte [esp + 0x124], 3
push 0x4b0
jmp 0x409df4
cmp eax, 0xfffffffe
jne 0x409e42
movzx eax, byte [esi + 1]
cmp eax, 0xffffffff
jne 0x409e42
lea ecx, [esp + 0x58]
call fcn.0040cd60
mov bl, 4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], bl
call fcn.0040a5a0
mov edx, dword [edi + 0x1c]
mov eax, dword [edi + 0x14]
lea ecx, [esp + 0x2c]
push ecx
push edx
push eax
push 0xfde9
mov byte [esp + 0x124], 5
push 0x4b1
lea ecx, [esp + 0x6c]
call fcn.00418270
mov ecx, edi
call fcn.00408220
lea ecx, [esp + 0x2c]
call fcn.0041f240
push eax
lea ecx, [esp + 0x30]
call fcn.0040a520
push eax
mov ecx, edi
call fcn.004087a0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], bl
call fcn.0040ac60
lea ecx, [esp + 0x58]
mov byte [esp + 0x114], 0
call fcn.0040cd90
jmp 0x409eb1
cmp dword [edi + 0x1c], 3
jle 0x409eb1
cmp byte [esi], 0xef
jne 0x409eb1
cmp byte [esi + 1], 0xbb
jne 0x409eb1
cmp byte [esi + 2], 0xbf
jne 0x409eb1
lea ecx, [esp + 0x2c]
call fcn.0040a5a0
mov ecx, dword [edi + 0x1c]
sub ecx, 3
push ecx
add esi, 3
push esi
lea ecx, [esp + 0x34]
mov byte [esp + 0x11c], 6
call fcn.0040b1f0
mov ecx, edi
call fcn.00408220
lea ecx, [esp + 0x2c]
call fcn.0041f240
push eax
lea ecx, [esp + 0x30]
call fcn.0040a520
push eax
mov ecx, edi
call fcn.004087a0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x114], 0
call fcn.0040ac60
mov byte [esp + 0x17], 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x114], 0xffffffff
call fcn.0042bd80
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x10c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0046255c
add esp, 0x104
ret 8