Function at 0x418520
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
push 0xcd0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
call fcn.00417230
mov ecx, dword [0x68d6e8]
push 0xcd0
push 0
push eax
mov dword [ecx*4 + 0x68c6e8], eax
call fcn.004b90a0
mov ecx, ebx
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x418571
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00417230
mov ecx, dword [0x68d6e8]
mov edx, eax
add esp, 4
mov ecx, dword [ecx*4 + 0x68c6e8]
mov dword [ecx + 0xba0], edx
mov ecx, ebx
sub edx, ebx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4185a0
push 0
push 0x20000000
push 3
push 0
push 1
push connect
sub esp, 0x18
mov ecx, ebx
mov edx, esp
xorps xmm0, xmm0
lea esi, [ecx + 1]
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4185e0
sub ecx, esi
push ecx
push ebx
mov ecx, edx
call fcn.004020f0
lea eax, [ebp - 0x1c]
push eax
call fcn.0041cf40
add esp, 0x1c
cmp dword [eax + 0x14], 8
jb 0x418606
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [0x68d6e8]
mov ecx, dword [ecx*4 + 0x68c6e8]
mov dword [ecx + 4], eax
lea ecx, [ebp - 0x1c]
call fcn.00402610
mov eax, dword [0x68d6e8]
mov eax, dword [eax*4 + 0x68c6e8]
mov dword [eax], 0
cmp dword [eax + 4], 0xffffffff
jne 0x418657
mov dword [eax + 4], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
push 4
push 0x3000
push 0x80000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [0x68d6e8]
mov ecx, dword [ecx*4 + 0x68c6e8]
mov dword [ecx + 0x948], eax
call fcn.004179c0
push 0
lea eax, [ebp - 0x30]
push eax
push 0x800
push dword [ecx + 0x948]
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [0x68d6e8]
mov ecx, 0x200
mov edx, dword [ebx*4 + 0x68c6e8]
mov esi, dword [edx + 0x948]
lea edi, [edx + 8]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x20]
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 0x24]
mov dword [edi], eax
mov eax, dword [edx + 0x14]
mov dword [ecx], eax
cmp dword [edx + 0x6d0], 1
jne 0x418735
push 0x20
call fcn.0049c406
mov esi, eax
add esp, 4
test esi, esi
je 0x41871e
push 0x80000
call fcn.004a9077
add esp, 4
mov dword [esi], eax
mov dword [esi + 4], 0x80000
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0x417db0
jmp 0x418720
xor esi, esi
mov ebx, dword [0x68d6e8]
mov eax, dword [ebx*4 + 0x68c6e8]
mov dword [eax + 0xcc0], esi
jmp 0x41873f
mov dword [edx + 0xcc0], 0
mov ecx, dword [ebx*4 + 0x68c6e8]
mov esi, dword [edi]
mov eax, dword [ecx + 0x30]
cmp eax, 1
jne 0x41875e
lea eax, [esi + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
jmp 0x41876a
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, esi
mov dword [ecx + 0x808], eax
mov dword [ecx + 0x824], 0
mov dword [ecx + 0x818], 0x800
mov dword [ecx + 0x81c], 0
mov eax, dword [ecx + 0xc]
cmp eax, 2
jl 0x4187aa
mov ecx, dword [ebp - 4]
lea eax, [ebx + 1]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
push eax
push dword [ebp - 0x28]
push str._s_nBmf_File_Version__d_nObsolete_version_of_bmf_file._nYoull_have_to_re_RIP_this_job.
push str.Error
call fcn.00415480
add esp, 0x10
push 0
call fcn.004cf3c2
int3