Function at 0x406660
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447ee8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x45b480]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor esi, esi
mov dword [ebp - 4], 1
cmp dword [edi + 0x90], esi
je 0x4066fb
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x4066c7
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4066c7
mov edx, dword [ebp + 8]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x406967
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x406967
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
jmp 0x406967
lea ecx, [edi + 0xac]
lea eax, [ebp + 8]
call fcn.00405900
lea ecx, [edi + 0xb0]
lea eax, [ebp + 0xc]
call fcn.00405900
mov eax, dword [ebp + 8]
push esi
push esi
push 3
push esi
push esi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0xb4], eax
cmp eax, 0xffffffff
jne 0x4067a7
mov eax, edi
call fcn.00406980
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x406768
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x406768
mov edx, dword [ebp + 8]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x40678f
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40678f
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
push esi
push esi
push esi
push 2
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [edi + 0xb8], eax
cmp eax, esi
jne 0x406831
mov eax, edi
call fcn.00406980
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x4067f2
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4067f2
mov edx, dword [ebp + 8]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, 0x460f3c
je 0x406819
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x406819
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.0042ce4b
add esp, 4
mov eax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
push esi
push esi
push esi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0xbc], eax
cmp eax, esi
jne 0x406876
mov eax, edi
call fcn.00406980
lea esi, [ebp + 8]
call fcn.004035c0
lea esi, [ebp + 0xc]
call fcn.004035c0
mov eax, 3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x574538]
inc eax
push 0x602
mov dword [0x574538], eax
mov dword [edi], eax
call dword [0x573900]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
mov eax, dword [ebp + 0xc]
call fcn.00406170
mov ecx, dword [edi]
push esi
push eax
push ecx
call dword [0x5738fc]
test eax, eax
jne 0x4068ef
mov eax, edi
mov dword [edi], esi
call fcn.00406980
lea esi, [ebp - 0x1c]
call fcn.00406120
lea esi, [ebp + 8]
call fcn.004035c0
lea esi, [ebp + 0xc]
call fcn.004035c0
mov eax, 5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
call fcn.00406a10
neg eax
sbb eax, eax
inc eax
mov ecx, edi
mov dword [edi + 0x94], eax
call fcn.00406d30
neg eax
sbb eax, eax
inc eax
push edi
mov dword [edi + 0x9c], eax
call fcn.00407620
neg eax
sbb eax, eax
inc eax
push edi
mov dword [edi + 0xa4], eax
call fcn.00407500
neg eax
sbb eax, eax
inc eax
mov ecx, edi
mov dword [edi + 0xa0], eax
call fcn.00406b00
neg eax
sbb eax, eax
inc eax
lea esi, [ebp - 0x1c]
mov dword [edi + 0x98], eax
mov dword [edi + 0x90], 1
call fcn.00406120
lea esi, [ebp + 8]
call fcn.004035c0
lea esi, [ebp + 0xc]
call fcn.004035c0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8