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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424b66
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x40
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x50], esi
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
xor eax, eax
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 4], eax
cmp dword [edx + 0x14], 8
mov dword [ebp - 0x48], 1
jb 0x403a99
mov edx, dword [edx]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x3c], edi
test edi, edi
je 0x403d17
cmp edi, 0xffffffff
je 0x403d17
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push edi
movlpd qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x403af8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileSizeEx_failed_with_error__u_n
call fcn.00401120
add esp, 8
jmp 0x403d2f
mov ecx, dword [ebp - 0x30]
mov eax, ecx
mov edx, dword [ebp - 0x2c]
or eax, edx
jne 0x403b16
push str.File_size_is_0_n
call fcn.00401120
add esp, 4
jmp 0x403d2f
push 0
push 2
push edx
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
push ecx
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x4c], 0
call fcn.00424190
mov edx, eax
mov eax, 0
add edx, 1
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
je 0x403bfe
cmp edx, 0x7fffffff
ja 0x403d56
lea ecx, [edx + edx]
mov dword [ebp - 0x40], ecx
cmp ecx, 0x1000
jb 0x403b9a
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x403d5b
push eax
call fcn.00408d5a
add esp, 4
test eax, eax
je 0x403d60
mov ecx, dword [ebp - 0x40]
lea edi, [eax + 0x23]
mov edx, dword [ebp - 0x38]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x403bb3
test ecx, ecx
je 0x403bb1
push ecx
call fcn.00408d5a
mov ecx, dword [ebp - 0x40]
add esp, 4
mov edx, dword [ebp - 0x38]
mov edi, eax
jmp 0x403bb3
xor edi, edi
lea eax, [ecx + edi]
mov dword [ebp - 0x34], 0
lea esi, [ebp - 0x4c]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], eax
mov ax, word [esi]
lea esi, [ebp - 0x34]
mov dword [ebp - 0x20], edi
cmp ax, word [esi]
jne 0x403be2
push ecx
push 0
push edi
call fcn.0040a7c0
add esp, 0xc
jmp 0x403bef
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 1
push ecx
push dword [ebp - 0x30]
mov dword [ebp - 0x24], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403c8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed_with_error__u_n
call fcn.00401120
mov edx, dword [ebp - 0x20]
add esp, 8
test edx, edx
je 0x403d2f
mov ecx, dword [ebp - 0x18]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x403c66
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403d60
push ecx
push edx
call fcn.00408d8f
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
jmp 0x403d2f
mov edx, dword [ebp - 0x20]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x3c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403c95
sub ecx, dword [ebp - 0x3c]
sar ecx, 1
cmp ecx, dword [esi + 0x14]
ja 0x403cd9
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [ebp - 0x38], esi
jb 0x403cba
mov eax, dword [esi]
mov dword [ebp - 0x38], eax
mov dword [esi + 0x10], ecx
lea esi, [ecx + ecx]
push esi
push edx
push eax
call fcn.0040a240
mov eax, dword [ebp - 0x38]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax], cx
mov esi, dword [ebp - 0x44]
jmp 0x403ce5
push edx
push dword [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.00406090
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x403d2f
mov ecx, dword [ebp - 0x18]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x403c66
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403d60
jmp 0x403c66
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFileW_failed_with_error__u_n
call fcn.00401120
add esp, 8
test edi, edi
je 0x403d36
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00408d47
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004064d0
call fcn.00401250
call fcn.0040f6f2
int3