Function at 0x412fe0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x94
push ebx
push ebp
mov ebp, dword [esp + 0xa0]
cmp byte [ebp + 0xd14], 0
push esi
push edi
je 0x413560
cmp byte [esp + 0xb4], 0
je 0x41306b
push 4
call fcn.0049d50f
xor ebx, ebx
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x413022
mov dword [eax], 1
mov byte [esp + 0x38], 1
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ebx
lea esi, [ebp + 0xcb8]
lea esp, [esp]
lea eax, [esp + 0x24]
push eax
mov eax, esi
call fcn.00409d00
test eax, eax
je 0x413050
lea esi, [esp + 0x24]
call fcn.00472be0
jmp 0x41306d
xor ebx, ebx
mov edi, dword [esp + 0xac]
test dword [edi + 4], 0xfffffffe
mov dword [esp + 0x18], ebx
jbe 0x413541
mov dword [esp + 0x20], ebx
jmp 0x413097
mov ebp, dword [esp + 0xa8]
push 4
call fcn.0049d50f
add esp, 4
mov dword [esp + 0x48], eax
cmp eax, ebx
je 0x4130af
mov dword [eax], 1
cmp byte [ebp + 0xd14], 0
mov byte [esp + 0x5c], 1
mov dword [esp + 0x64], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x58], ebx
je 0x413557
lea ecx, [esp + 0x48]
lea esi, [ebp + 0xcb8]
push ecx
mov eax, esi
call fcn.00409d00
test eax, eax
je 0x41310b
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x48]
push edx
mov eax, esi
call fcn.00409d00
test eax, eax
jne 0x4130f3
lea eax, [esp + 0x48]
push eax
call fcn.00412e80
fstp qword [esp + 0x9c]
add esp, 4
push 4
call fcn.0049d50f
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x413137
mov dword [eax], 1
lea ecx, [esp + 0x48]
push ecx
lea eax, [esp + 0x28]
mov byte [esp + 0x3c], 1
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x38], ebx
call fcn.00412d80
mov esi, dword [edi + 8]
add esi, dword [esp + 0x24]
add esp, 4
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x41317d
cmp eax, dword [esp + 0x34]
je 0x4131c1
call fcn.00472be0
movq xmm0, qword [esp + 0x24]
movq qword [esi], xmm0
movq xmm0, qword [esp + 0x2c]
movq qword [esi + 8], xmm0
movq xmm0, qword [esp + 0x34]
movq qword [esi + 0x10], xmm0
movq xmm0, qword [esp + 0x3c]
movq qword [esi + 0x18], xmm0
mov edx, dword [esp + 0x44]
mov dword [esi + 0x20], edx
mov esi, dword [esi]
cmp esi, ebx
je 0x4131c1
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
xor ebp, ebp
cmp dword [esp + 0x18], ebx
jbe 0x413354
mov ecx, dword [esp + 0x20]
mov eax, dword [edi + 8]
xor edx, edx
add eax, ecx
mov ecx, dword [eax - 0x20]
mov dword [esp + 0x94], ecx
mov ecx, dword [eax - 0x14]
mov dword [esp + 0x84], ecx
mov ecx, dword [eax + 4]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], eax
jmp 0x413216
mov edx, dword [esp + 0x14]
xor ebx, ebx
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x8c]
imul eax, edx
xor edi, edi
imul ecx, edx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x90], ecx
jmp 0x41324b
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x84]
add eax, edi
lea ebx, [edx + eax*4]
mov eax, dword [esp + 0x88]
add ecx, edi
lea esi, [eax + ecx*4]
movzx eax, byte [esi + 2]
movzx ecx, byte [ebx + 2]
sub eax, ecx
cdq
mov ecx, eax
movzx eax, byte [esi + 1]
xor ecx, edx
sub ecx, edx
movzx edx, byte [ebx + 1]
sub eax, edx
cdq
mov dword [esp + 0x80], esi
mov esi, eax
mov eax, dword [esp + 0x80]
movzx eax, byte [eax]
xor esi, edx
sub esi, edx
movzx edx, byte [ebx]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp ebp, ecx
jae 0x4132b4
mov ebp, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ecx
jmp 0x4132b8
mov ecx, dword [esp + 0x14]
cmp ebp, esi
jae 0x4132c6
mov ebp, esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ecx
cmp ebp, eax
jae 0x4132d4
mov ebp, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ecx
inc edi
cmp edi, 8
jb 0x413240
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 8
jb 0x413210
mov eax, dword [esp + 0x28]
imul ebp, ebp, 0x7fff8
imul eax, dword [esp + 0x1c]
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
lea esi, [ecx + eax*4]
mov eax, dword [esi]
mov ecx, eax
and ecx, 0xff00ff
shr ebp, 0x10
inc ebp
mov edi, 0xff0000
sub edi, ecx
imul edi, ebp
shr edi, 8
add edi, ecx
mov edx, eax
and edx, 0xff00
mov ecx, edx
imul ecx, ebp
neg ecx
shr ecx, 8
add ecx, edx
and edi, 0xff00ff
and ecx, 0xff00
or edi, ecx
and eax, 0xff000000
or edi, eax
mov dword [esi], edi
xor ebx, ebx
mov edx, dword [0x5687e0]
push edx
push str.log_d8.bmp
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], ebx
call fcn.00401470
mov esi, dword [esp + 0x18]
add esp, 8
cmp esi, ebx
je 0x41337d
lea eax, [esi + 4]
jmp 0x41337f
xor eax, eax
push eax
lea edi, [esp + 0x28]
call fcn.004749f0
cmp esi, ebx
je 0x4133b2
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x80
jl 0x4133a9
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x4133b2
cmp eax, ebx
jne 0x4133b2
call fcn.0045f130
mov ebp, dword [esp + 0xac]
mov eax, dword [ebp]
movsd xmm0, qword [esp + 0x98]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0xb0]
movsd qword [eax + esi*8], xmm0
mov eax, dword [0x5687e0]
mov ecx, eax
push edx
push ecx
inc eax
push str.log_d__s.bmp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
mov dword [0x5687e0], eax
call fcn.00401470
add esp, 0xc
cmp dword [ebp + 0x10], esi
jne 0x4134cb
mov eax, dword [ebp + 0x24]
lea esi, [ebp + 0x14]
cmp eax, ebx
je 0x413412
cmp eax, dword [esp + 0x58]
je 0x413456
call fcn.00472be0
movq xmm0, qword [esp + 0x48]
mov eax, dword [esp + 0x68]
movq qword [esi], xmm0
movq xmm0, qword [esp + 0x50]
movq qword [esi + 8], xmm0
movq xmm0, qword [esp + 0x58]
movq qword [esi + 0x10], xmm0
movq xmm0, qword [esp + 0x60]
movq qword [esi + 0x18], xmm0
mov dword [esi + 0x20], eax
mov esi, dword [esi]
cmp esi, ebx
je 0x413456
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, 0x32
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
lea eax, [esp + 0x6c]
lea edx, [esp + 0x48]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
call fcn.00473360
cmp eax, 3
je 0x4134cb
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x78]
cmp esi, ebx
jge 0x4134b7
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x6c]
sub edi, ebp
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x58]
imul ecx, esi
push edi
add ecx, ebp
lea eax, [edx + ecx*4]
push 0xff000000
push eax
call fcn.0046c140
inc esi
add esp, 0xc
cmp esi, ebx
jl 0x413493
cmp byte [0x567ff0], 0
je 0x4134c2
emms
mov ebp, dword [esp + 0xac]
xor ebx, ebx
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x4134d8
lea eax, [esi + 4]
jmp 0x4134da
xor eax, eax
push eax
lea edi, [esp + 0x4c]
call fcn.004749f0
cmp esi, ebx
je 0x41350d
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x80
jl 0x413504
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x41350d
cmp eax, ebx
jne 0x41350d
call fcn.0045f130
lea esi, [esp + 0x24]
call fcn.00472be0
lea esi, [esp + 0x48]
call fcn.00472be0
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 4]
add dword [esp + 0x20], 0x24
mov edi, dword [esp + 0xac]
inc eax
shr ecx, 1
mov dword [esp + 0x18], eax
cmp eax, ecx
jb 0x413090
mov esi, edi
call fcn.00412f60
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x10
lea esi, [esp + 0x48]
call fcn.00472be0
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x94
ret 0x10