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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459810
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x474454]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
cmp dword [eax - 0xc], ebx
je 0x4121a4
push 0x45f4aa
push eax
call fcn.0043f751
add esp, 8
cmp eax, ebx
sete al
test al, al
jne 0x4121a4
mov eax, dword [esi]
push str.__CR__FAILED_DOWNLOAD_READ__CR__
push eax
call fcn.0043f751
add esp, 8
cmp eax, ebx
sete al
test al, al
jne 0x4121a4
mov esi, dword [esi]
push ebx
push ebx
push 3
push ebx
push ebx
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x411ec1
push str.Failed_to_open_file:
lea ecx, [ebp - 0x14]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 5
call fcn.00402280
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004224a0
add esp, 8
mov esi, eax
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 7
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 8
call fcn.00422410
push esi
push eax
lea ecx, [ebp - 0x24]
mov bl, 9
push ecx
mov byte [ebp - 4], bl
call fcn.00422410
push 2
push eax
lea edx, [ebp - 0x10]
push edx
mov byte [ebp - 4], 0xa
call fcn.00406150
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
add esp, 0x24
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411e31
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 8
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411e53
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411e75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov byte [ebp - 4], 6
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411e97
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411eb9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
jmp 0x4122ad
lea ecx, [ebp - 0x3c]
xor eax, eax
push ecx
push esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x411f6e
push str.GetFileSizeEx_failed
lea ecx, [ebp - 0x10]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xb
call fcn.00402280
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 0xc
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 0xd
call fcn.00422410
mov byte [ebp - 4], 0xe
push 2
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.00406150
add esp, 0x18
lea ecx, [ebp - 0x2c]
call fcn.0042dd50
lea ecx, [ebp + 0xc]
call fcn.0042dd50
lea ecx, [ebp - 0x14]
call fcn.0042dd50
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], edi
call fcn.0042dd50
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4122c9
cmp dword [ebp - 0x38], ebx
je 0x411fcc
push str.File_size_is_too_big
lea ecx, [ebp - 0x10]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xf
call fcn.00402280
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 0x10
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 0x11
call fcn.00422410
mov byte [ebp - 4], 0x12
jmp 0x411f30
cmp dword [ebp - 0x3c], ebx
jne 0x41206c
push str.File_size_is_zero
lea ecx, [ebp - 0x10]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0x13
call fcn.00402280
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 0x14
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 0x15
call fcn.00422410
push 2
push eax
lea ecx, [ebp - 0x14]
push ecx
mov byte [ebp - 4], 0x16
call fcn.00406150
add esp, 0x18
lea ecx, [ebp - 0x2c]
call fcn.0042dd50
lea ecx, [ebp + 0xc]
call fcn.0042dd50
lea ecx, [ebp - 0x14]
call fcn.0042dd50
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], edi
call fcn.0042dd50
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x45f4aa
jmp 0x4122ce
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x3c]
push ebx
lea ecx, [ebp - 0x30]
push ecx
push eax
push eax
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0x17
mov dword [ebp - 0x30], ebx
call fcn.00401830
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x3c]
push edx
lea ecx, [ebp + 0xc]
mov edi, eax
call fcn.00410510
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x412171
push str.ReadFile_failed
lea ecx, [ebp - 0x20]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x18
call fcn.00402280
mov eax, dword [0x474238]
mov edx, dword [eax + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 0x19
call edx
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x34]
push edx
mov byte [ebp - 4], 0x1a
call fcn.00422410
push 2
push eax
lea eax, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 0x1b
call fcn.00406150
add esp, 0x18
lea ecx, [ebp - 0x34]
call fcn.0042dd50
lea ecx, [ebp - 0x18]
call fcn.0042dd50
lea ecx, [ebp - 0x1c]
call fcn.0042dd50
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x17
call fcn.0042dd50
mov esi, dword [ebp + 8]
push str.__CR__FAILED_DOWNLOAD_READ__CR__
mov ecx, esi
call fcn.00402280
lea ecx, [ebp + 0xc]
call fcn.0042dd50
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffff0
push ecx
call fcn.004011e0
mov esi, dword [ebp + 8]
add eax, 0x10
add esp, 4
lea ecx, [ebp + 0xc]
mov dword [esi], eax
call fcn.0042dd50
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Received_an_invalid_path
lea ecx, [ebp - 0x24]
call fcn.00402280
push str.ReadFromFile
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.00402280
mov edx, dword [0x474238]
mov eax, dword [edx + 0xc]
mov ecx, 0x474238
mov byte [ebp - 4], 1
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 2
call fcn.00422410
add esp, 0xc
mov esi, eax
mov bl, 3
push str.GlobalLog
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call fcn.00402280
push 2
push esi
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp + 0xc]
push edx
mov ecx, 0x475af8
mov byte [ebp - 4], 4
call fcn.004023f0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edi, 0xffffffff
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412244
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412266
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412288
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4122aa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edi
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x4122c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.__CR__FAILED_DOWNLOAD_READ__CR__
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00402280
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret