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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x447d72
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x45c070]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebx
push ebx
push 0x80
push 3
push ebx
push 1
mov dword [esp + 0x84], ebx
mov eax, dword [0x46024c]
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x405ad8
call fcn.00409020
cmp eax, ebx
je 0x405adc
mov esi, dword [0x45f3ec]
cmp dword [esi - 0xc], ebx
je 0x405be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x78
push str.AGENT_PROPERTIES::LoadFromFile
mov edx, str...Commonprotocol.cpp
mov ecx, esi
call fcn.00403b50
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x60]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x5c], eax
cmp eax, 0xffffffff
jne 0x405b02
call fcn.00409020
cmp eax, ebx
jl 0x405b0e
mov eax, dword [esp + 0x5c]
mov edi, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x60], eax
jmp 0x405b12
mov edi, dword [esp + 0x5c]
mov edx, dword [0x45d48c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45d48c
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x70], 1
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x405b4a
mov ecx, edi
lea eax, [esp + 0x24]
call fcn.004075c0
cmp edi, ebx
jl 0x40605f
mov esi, dword [esp + 0x24]
cmp edi, dword [esi - 8]
jg 0x40605f
push ebx
lea ecx, [esp + 0x50]
push ecx
push edi
mov dword [esi - 0xc], edi
mov byte [edi + esi], bl
mov edi, dword [esp + 0x34]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x405bf9
call fcn.00409020
cmp eax, ebx
je 0x405bf9
mov eax, dword [0x45f3ec]
cmp dword [eax - 0xc], ebx
je 0x405bb1
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x83
push str.AGENT_PROPERTIES::LoadFromFile
mov edx, str...Commonprotocol.cpp
mov ecx, esi
call fcn.00403b50
add esp, 0xc
mov byte [esp + 0x70], bl
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405bd5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x405be4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
mov dword [esp + 0x30], ebx
push edx
lea ebx, [esp + 0x34]
call fcn.00406a30
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x74], 2
mov ecx, dword [esp + 0x24]
push 0x451dec
push ecx
call fcn.0042f4c6
add esp, 0xc
cmp eax, 1
je 0x405cad
mov edx, dword [0x45f3ec]
cmp dword [edx - 0xc], 0
je 0x405c59
push 0x8c
push str.AGENT_PROPERTIES::LoadFromFile
push str...Commonprotocol.cpp
mov ecx, str.CodePage_in_Agent_backup_file_not_found
call fcn.00403d90
add esp, 0xc
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405c7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x70], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c9f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x405be4
push edi
jmp 0x405bde
mov edx, dword [0x45d48c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45d48c
mov dword [esp + 0x48], 0x45f3f0
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x70], 3
mov edx, dword [0x45d48c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45d48c
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x70], 4
cmp dword [esp + 0x2c], 0xffffffff
je 0x405fac
jmp 0x405d00
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x28]
push edx
lea ebx, [esp + 0x34]
call fcn.00406a30
mov byte [esp + 0x70], 5
mov ecx, dword [eax]
mov edi, dword [esp + 0x20]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x405d6a
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x405d5d
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x405d5d
call fcn.00407480
mov esi, eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x405d54
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add esi, 0x10
mov dword [esp + 0x20], esi
jmp 0x405d6a
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x24]
call fcn.004073f0
mov byte [esp + 0x70], 4
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x34]
push ecx
lea edi, [esp + 0x20]
lea ebx, [esp + 0x24]
call fcn.00406070
lea edx, [esp + 0x14]
push edx
mov ecx, edi
call fcn.00406120
test al, al
je 0x405f99
mov esi, dword [0x4601e8]
lea edi, [esp + 0x14]
lea ebx, [esp + 0x50]
mov eax, 0x4601e4
call fcn.00407060
cmp dword [eax], esi
je 0x405e1c
mov eax, edi
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ebx, 0x451e48
call fcn.00406e80
add esp, 8
mov edi, eax
mov byte [esp + 0x70], 6
or dword [esp + 0x18], 1
push 0x4601e4
lea ecx, [esp + 0x18]
call fcn.00406f60
mov eax, dword [eax]
mov edi, dword [edi]
mov esi, dword [esp + 0x1c]
push eax
push edi
push esi
call fcn.0042f2e6
add esp, 0xc
cmp eax, 1
jne 0x405e20
mov bl, al
jmp 0x405e22
mov esi, dword [esp + 0x1c]
xor bl, bl
mov dword [esp + 0x70], 4
test byte [esp + 0x18], 1
je 0x405e56
mov eax, dword [esp + 0x38]
and dword [esp + 0x18], 0xfffffffe
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405e56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x405f99
mov ecx, dword [0x4601f8]
lea edi, [esp + 0x14]
lea ebx, [esp + 0x54]
mov eax, 0x4601f4
mov dword [esp + 0x3c], ecx
call fcn.00407060
mov edx, dword [esp + 0x3c]
cmp dword [eax], edx
je 0x405ed3
mov eax, edi
push eax
lea ecx, [esp + 0x48]
push ecx
mov ebx, 0x451e48
call fcn.00406e80
add esp, 8
mov edi, eax
mov byte [esp + 0x70], 7
or dword [esp + 0x18], 2
push 0x4601f4
lea ecx, [esp + 0x18]
call fcn.00406f60
mov edi, dword [edi]
mov ebx, dword [eax]
lea edx, [esp + 0x40]
push edx
push edi
push esi
call fcn.0042f2e6
add esp, 0xc
cmp eax, 1
jne 0x405ed3
mov al, byte [esp + 0x40]
mov byte [ebx], al
mov bl, 1
jmp 0x405ed5
xor bl, bl
mov dword [esp + 0x70], 4
test byte [esp + 0x18], 2
je 0x405f09
mov eax, dword [esp + 0x44]
and dword [esp + 0x18], 0xfffffffd
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f09
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x405f99
mov ecx, dword [0x460208]
lea edi, [esp + 0x14]
lea ebx, [esp + 0x58]
mov eax, 0x460204
mov dword [esp + 0x3c], ecx
call fcn.00407060
mov edx, dword [esp + 0x3c]
cmp dword [eax], edx
je 0x405f61
mov eax, dword [esp + 0x14]
mov edi, dword [esi - 0xc]
mov ebx, dword [eax - 0xc]
push 0x460204
lea ecx, [esp + 0x18]
call fcn.00406f60
mov ecx, dword [eax]
sub edi, ebx
dec edi
push edi
push ecx
lea eax, [esp + 0x24]
call fcn.00406280
test al, al
jne 0x405f99
mov esi, dword [0x460218]
lea edi, [esp + 0x14]
lea ebx, [esp + 0x5c]
mov eax, 0x460214
call fcn.00407060
cmp dword [eax], esi
je 0x405f99
push 0x460214
mov ecx, edi
call fcn.00406f60
mov edx, dword [eax]
push edx
lea ecx, [esp + 0x20]
lea ebx, [esp + 0x4c]
call fcn.00406330
cmp dword [esp + 0x2c], 0xffffffff
jne 0x405d00
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov byte [esp + 0x70], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405fd1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x70], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ff6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x70], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40601b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [esp + 0x70], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40603c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x406047
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004036b0
int3