Function at 0x406480
Capabilities:
Read file on windows
Terminate process

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push 1
mov ebp, ecx
push 0x104
call dword [sym.imp.MSVCRT.dll_calloc]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4064b1
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp + 0x4bbc]
push 0x41a144
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
mov esi, eax
test esi, esi
mov dword [esp + 0x20], esi
push 0
jne 0x4064e3
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp + 0x1d8c]
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 4
push 1
push ebx
call edi
add esp, 0x1c
mov ecx, ebp
push ebx
call fcn.00406120
mov ecx, eax
mov dl, 0x28
mov dword [esp + 0x24], ecx
mov byte [ebp + 0x1e28], 0x5a
lea eax, [ecx + ecx*4]
mov byte [ebp + 0x1e29], 0xa5
shl eax, 3
mov dword [esp + 0x28], eax
add eax, 9
mov dword [esp + 0x14], eax
mov byte [ebp + 0x1e2c], 4
shr eax, 8
mov byte [ebp + 0x1e2a], al
mov al, cl
imul dl
mov dl, byte [ebp + 0x1da8]
add al, 9
mov byte [ebp + 0x1e2b], al
mov eax, dword [ebp + 0x1da8]
sar eax, 8
test ecx, ecx
mov byte [ebp + 0x1e2d], al
mov byte [ebp + 0x1e2e], dl
mov byte [ebp + 0x1e2f], cl
jle 0x406649
lea eax, [ebp + 0x4afc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
push esi
push 4
push 1
push ebx
call edi
add esp, 0x10
xor eax, eax
mov edx, dword [esp + 0x10]
mov cl, byte [eax + ebx]
mov byte [edx + eax], cl
inc eax
cmp eax, 4
jl 0x406591
mov eax, dword [esp + 0x18]
mov ecx, edx
add ecx, 4
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x406584
mov ecx, dword [esp + 0x24]
test ecx, ecx
jle 0x406649
lea eax, [ebp + 0x1e30]
lea edx, [ebp + 0x4afc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
jmp 0x4065e1
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00406120
push 0
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push 0x28
push 1
push ebx
call edi
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
mov ecx, 0xa
mov esi, ebx
lea edi, [ebp + 0x1d24]
add esp, 0x1c
rep movsd dword es:[edi], dword [esi]
mov edi, eax
add eax, 0x28
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov ecx, 0xa
lea esi, [ebp + 0x1d24]
add edx, 4
dec eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
jne 0x4065db
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + ecx*4]
lea edi, [ebp + 0x1e28]
lea edx, [ecx*8 + 8]
mov ecx, ebp
push edx
push edi
call fcn.004060f0
mov ecx, dword [esp + 0x28]
push ebx
mov byte [ecx + ebp + 0x1e30], al
call dword [sym.imp.MSVCRT.dll_free]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [ebp + 0x1a68]
add esp, 8
dec eax
je 0x4066d9
dec eax
je 0x4066b3
dec eax
jne 0x4066f2
mov edx, dword [esp + 0x14]
mov ecx, ebp
push edx
push 0x1f4
push edi
call fcn.00405c80
push 0x1f4
mov ecx, ebp
call fcn.00405ed0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x14]
mov ecx, ebp
push eax
push 0x1f4
push edi
call fcn.00405520
push 0x1f4
mov ecx, ebp
call fcn.004055a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov ecx, dword [esp + 0x14]
push ecx
push edi
mov ecx, ebp
call fcn.00405a30
push 0x7a120
mov ecx, ebp
call fcn.00405a90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret