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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
cmp dword [ebp + 0xc], edi
jne 0x403bec
mov eax, 0x80070057
push eax
push 0x347
push str.c:_agent_work35_swix_srclibsdutil_fileutil.cpp
mov esi, eax
call fcn.004013b3
jmp 0x403e70
cmp dword [ebp + 8], edi
jne 0x403bfe
mov eax, 0x80070057
push eax
push 0x348
jmp 0x403bdb
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x403c12
mov eax, 0x80070057
push eax
push 0x349
jmp 0x403bdb
xor ecx, ecx
cmp cx, word [eax]
jne 0x403c26
mov eax, 0x80070057
push eax
push 0x34a
jmp 0x403bdb
push ebx
push edi
push 0x8000080
push 3
push edi
push 5
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 4], esi
cmp esi, 0xffffffff
jne 0x403c99
call ebx
movzx ecx, ax
mov edx, eax
or ecx, 0x80070000
test eax, eax
jle 0x403c61
mov edx, ecx
mov esi, 0x80070002
cmp edx, esi
je 0x403e6f
test eax, eax
je 0x403c96
mov esi, eax
jle 0x403c78
mov esi, ecx
test esi, esi
js 0x403c81
mov esi, 0x80004005
push esi
push 0x354
push str.c:_agent_work35_swix_srclibsdutil_fileutil.cpp
call fcn.004013b3
jmp 0x403e6f
mov esi, dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x403cd7
call ebx
mov esi, eax
test esi, esi
jle 0x403cbb
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403cc2
mov esi, 0x80004005
push esi
push 0x359
push str.c:_agent_work35_swix_srclibsdutil_fileutil.cpp
call fcn.004013b3
jmp 0x403e60
cmp dword [ebp + 0x14], edi
je 0x403d24
mov edi, dword [ebp + 0x18]
xor eax, eax
cmp eax, dword [ebp - 8]
jl 0x403cf7
jg 0x403ced
cmp edi, dword [ebp - 0xc]
jbe 0x403cf7
mov esi, 0x80070057
jmp 0x403e60
push 1
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x403d24
call ebx
mov esi, eax
test esi, esi
jle 0x403d1a
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x403d24
push esi
push 0x367
jmp 0x403cc8
cmp dword [ebp + 0x20], 0
je 0x403d50
mov ebx, dword [ebp + 0x1c]
xor edi, edi
mov esi, dword [ebp + 8]
cmp dword [esi], 0
je 0x403d9e
test ebx, ebx
jne 0x403d7c
push dword [esi]
call fcn.004051ae
mov dword [esi], edi
mov eax, dword [ebp + 0xc]
mov esi, edi
mov dword [eax], edi
jmp 0x403e60
mov ecx, dword [ebp - 0xc]
mov ebx, ecx
mov eax, dword [ebp - 8]
sub ebx, edi
sub ecx, edi
push 0
pop edi
sbb eax, edi
cmp edi, eax
jg 0x403d2f
jl 0x403d6c
cmp dword [ebp + 0x1c], ecx
jae 0x403d2f
mov esi, 0x8007007a
push esi
push 0x379
jmp 0x403cc8
push 1
push ebx
push dword [esi]
call fcn.00405286
mov edi, eax
test edi, edi
jne 0x403dc2
mov eax, 0x8007000e
push eax
mov esi, eax
push 0x387
jmp 0x403cc8
test ebx, ebx
je 0x403d44
push 1
push ebx
call fcn.004050e9
mov edi, eax
test edi, edi
jne 0x403dc2
mov eax, 0x8007000e
push eax
mov esi, eax
push 0x394
jmp 0x403cc8
xor ecx, ecx
mov eax, ecx
mov dword [ebp + 0x10], ecx
mov dword [ebp + 0x1c], eax
jmp 0x403dd0
xor ecx, ecx
mov dword [ebp + 0x14], ecx
lea ecx, [ebp + 0x14]
push ecx
push eax
push ebx
call fcn.0040359b
mov esi, eax
test esi, esi
js 0x403e56
mov ecx, dword [ebp + 0x1c]
lea eax, [ebp + 0x10]
push 0
push eax
push dword [ebp + 0x14]
add ecx, edi
push ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e28
mov eax, dword [ebp + 0x1c]
add eax, dword [ebp + 0x10]
cmp dword [ebp + 0x10], 0
mov dword [ebp + 0x1c], eax
jne 0x403dce
cmp eax, ebx
je 0x403e1a
mov esi, 0x8000ffff
jmp 0x403e56
mov eax, dword [ebp + 8]
mov dword [eax], edi
xor edi, edi
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
jmp 0x403e56
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x403e3f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403e46
mov esi, 0x80004005
push esi
push 0x3a1
push str.c:_agent_work35_swix_srclibsdutil_fileutil.cpp
call fcn.004013b3
test edi, edi
je 0x403e60
push edi
call fcn.004051ae
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x403e6f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
leave
ret 0x1c