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

Disassembly:
sub esp, 0x3cc
push ebp
mov ebp, dword [esp + 0x3d8]
test ebp, 0x4000
push esi
push edi
mov esi, 0x300183f0
jne 0x30012311
mov dword [0x30065260], 1
mov dword [0x30065264], 0
xor eax, eax
mov ecx, 0xe3
lea edi, [esp + 0x4c]
rep stosd dword es:[edi], eax
call sym.binkw32.dll__RADTimerRead_0
mov dword [esp + 0x304], eax
mov eax, ebp
and eax, 0x4000000
mov byte [0x30055dc8], 0
mov dword [esp + 0xc], eax
je 0x30012352
mov esi, dword [esp + 0x3dc]
mov ecx, 0xb
lea edi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
jmp 0x300123bf
test ebp, 0x2000000
je 0x30012365
mov eax, dword [0x30065284]
test eax, eax
je 0x30012365
mov esi, eax
mov eax, dword [esp + 0x3dc]
push ebp
push eax
lea ecx, [esp + 0x164]
push ecx
mov dword [0x30065284], 0
call esi
test eax, eax
jne 0x300123a7
mov al, byte [0x30055dc8]
test al, al
jne 0x30012399
push str.Error_opening_file.
call sym.binkw32.dll__BinkSetError_4
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x3cc
ret 8
push 0x2c
lea edx, [esp + 0x24]
push edx
push 0
lea eax, [esp + 0x168]
push eax
call dword [esp + 0x16c]
mov eax, dword [esp + 0x20]
cmp eax, 0x664b4942
push ebx
je 0x300123ef
cmp eax, 0x674b4942
je 0x300123ef
cmp eax, 0x684b4942
je 0x300123ef
cmp eax, 0x694b4942
je 0x300123ef
push str.Not_a_Bink_file.
call sym.binkw32.dll__BinkSetError_4
jmp 0x30012bb1
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x30012416
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + str.The_file_doesnt_contain_any_compressed_frames_yet.]
mov byte [eax + 0x30055dc8], cl
inc eax
test cl, cl
jne 0x30012400
jmp 0x30012bb1
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
lea eax, [esi + 1]
shr eax, 1
add eax, 7
and eax, 0xfffffff8
lea ecx, [edi + 1]
shr ecx, 1
add ecx, 7
mov dword [esp + 0x124], eax
add eax, eax
and ecx, 0xfffffff8
mov dword [esp + 0x11c], eax
lea ebx, [ecx + ecx]
mov dword [esp + 0x128], ecx
mov ecx, eax
mov eax, edx
and eax, 0x20000
or eax, ebp
shr ecx, 4
and eax, 0x8fffffff
test edx, 0x100000
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], edi
mov dword [esp + 0x2a4], esi
mov dword [esp + 0x2a8], edi
mov dword [esp + 0x74], edx
mov dword [esp + 0x120], ebx
mov dword [esp + 0x130], ecx
mov dword [esp + 0x70], eax
jne 0x300124a2
and eax, 0xffefffff
mov dword [esp + 0x70], eax
mov ebp, dword [esp + 0x3e4]
and ebp, 0x70000000
cmp ebp, 0x70000000
je 0x30012516
test ebp, ebp
je 0x300124bf
or eax, ebp
jmp 0x300124c7
and edx, 0x70000000
or eax, edx
mov edx, eax
and edx, 0x70000000
cmp edx, 0x30000000
mov dword [esp + 0x70], eax
ja 0x300124f8
je 0x300124ef
cmp edx, 0x10000000
je 0x3001250f
cmp edx, 0x20000000
jne 0x30012516
jmp 0x3001250f
lea edx, [esi + esi]
mov dword [esp + 0x50], edx
jmp 0x30012516
cmp edx, 0x40000000
je 0x30012508
cmp edx, 0x50000000
jne 0x30012516
lea edx, [esi + esi]
mov dword [esp + 0x50], edx
lea edx, [edi + edi]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x24]
cmp edx, 0x664b4942
je 0x30012539
cmp edx, 0x674b4942
je 0x30012539
cmp edx, 0x684b4942
jne 0x30012542
or eax, 0x8000
jmp 0x3001253e
or eax, 0x18000
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x3e4]
test ah, 0x10
mov dword [esp + 0x13c], edx
mov edx, dword [esp + 0x40]
je 0x3001258c
mov eax, dword [0x30065254]
cmp eax, 0xffffffff
je 0x3001258c
mov dword [esp + 0x64], eax
mov eax, dword [0x30055dc0]
mov dword [esp + 0x68], eax
mov dword [0x30065254], 0xffffffff
jmp 0x30012594
mov dword [esp + 0x64], edx
mov dword [esp + 0x68], esi
mov eax, dword [esp + 0x28]
imul ecx, ebx
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x140], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x138], eax
mov eax, esi
shr eax, 1
add eax, edx
mov dword [esp + 0x30c], edx
xor edx, edx
div esi
shr ecx, 4
mov dword [esp + 0x310], esi
mov dword [esp + 0x134], ecx
test eax, eax
mov dword [esp + 0x314], eax
jne 0x300125ee
mov eax, 1
mov dword [esp + 0x314], eax
lea edx, [eax*4 - 4]
add ecx, 0x10
push ecx
lea eax, [esp + 0x130]
push eax
mov dword [esp + 0x320], edx
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x320]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x324]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x328]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x32c]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x330]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x334]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x314]
lea edx, [ecx*4]
push edx
lea eax, [esp + 0x338]
push eax
call fcn.300010c0
mov eax, dword [0x30065260]
test eax, eax
jne 0x300126df
mov eax, 1
imul eax, eax, 0x178
push eax
lea ecx, [esp + 0x354]
push ecx
call fcn.300010c0
mov edx, dword [0x30065260]
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x2b0]
push ecx
call fcn.300010c0
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0x360]
call fcn.3001d220
mov edx, dword [esp + 0x360]
push edx
lea eax, [esp + 0x364]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x364]
push ecx
lea edx, [esp + 0x368]
push edx
call fcn.300010c0
mov eax, dword [esp + 0x368]
push eax
lea ecx, [esp + 0x36c]
push ecx
call fcn.300010c0
mov edx, dword [esp + 0x36c]
push edx
lea eax, [esp + 0x370]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x370]
push ecx
lea edx, [esp + 0x374]
push edx
call fcn.300010c0
mov eax, dword [esp + 0x374]
push eax
lea ecx, [esp + 0x378]
push ecx
call fcn.300010c0
mov edx, dword [esp + 0x378]
push edx
lea eax, [esp + 0x37c]
push eax
call fcn.300010c0
mov ecx, dword [esp + 0x37c]
push ecx
lea edx, [esp + 0x380]
push edx
call fcn.300010c0
mov eax, dword [esp + 0x380]
push eax
lea ecx, [esp + 0x384]
push ecx
call fcn.300010c0
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x30012856
mov edx, dword [esp + 0x13c]
lea eax, [edx*4 + 4]
push eax
lea ecx, [esp + 0x160]
push ecx
call fcn.300010c0
mov edx, dword [esp + 0x140]
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x2b4]
push ecx
call fcn.300010c0
mov edx, dword [esp + 0x140]
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x2b8]
push ecx
call fcn.300010c0
mov edx, dword [esp + 0x140]
lea eax, [edx*4]
push eax
lea ecx, [esp + 0x2bc]
push ecx
call fcn.300010c0
mov eax, dword [esp + 0x2f8]
mov edx, dword [0x30058078]
lea ecx, [eax + edx + 0x38c]
mov eax, 0x38c
mov dword [esp + 0x2f8], ecx
call fcn.300011c0
mov ebp, eax
test ebp, ebp
je 0x30012b97
mov ecx, 0xe3
lea esi, [esp + 0x50]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp + 0x2d0]
mov dword [ebp + 0x128], ebp
mov dword [edx], 0
mov eax, dword [ebp + 0x2d4]
mov dword [eax], 0
mov ecx, dword [ebp + 0x2d8]
mov dword [ecx], 0
mov edx, dword [ebp + 0x2dc]
mov dword [edx], 0
mov eax, dword [ebp + 0x2e0]
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
mov ecx, dword [ebp + 0x2e4]
mov dword [ecx], 0
je 0x30012921
mov ecx, dword [esp + 0x3e0]
mov eax, dword [ebp + 0xf0]
lea edx, [ecx + 0x2c]
mov dword [ebp + 0x260], edx
lea edx, [ecx + eax*4 + 0x2c]
mov dword [ebp + 0x264], edx
lea edx, [ecx + eax*8 + 0x2c]
lea eax, [eax + eax*2]
lea ecx, [ecx + eax*4 + 0x2c]
mov dword [ebp + 0x268], edx
mov dword [ebp + 0x10c], ecx
jmp 0x30012983
mov edx, dword [ebp + 0xf0]
mov eax, dword [ebp + 0x260]
shl edx, 2
push edx
push eax
lea esi, [ebp + 0x110]
push 0xffffffffffffffff
push esi
call dword [esi]
mov ecx, dword [ebp + 0xf0]
mov edx, dword [ebp + 0x264]
shl ecx, 2
push ecx
push edx
push 0xffffffffffffffff
push esi
call dword [esi]
mov eax, dword [ebp + 0xf0]
mov ecx, dword [ebp + 0x268]
shl eax, 2
push eax
push ecx
push 0xffffffffffffffff
push esi
call dword [esi]
mov edx, dword [ebp + 0xec]
mov ecx, dword [ebp + 0x10c]
lea eax, [edx*4 + 4]
push eax
push ecx
push 0xffffffffffffffff
push esi
call dword [esi]
mov ecx, dword [ebp + 0x2c4]
mov ebx, dword [ebp + 0x10c]
lea edx, [esp + 0x14]
push edx
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xf8]
push eax
push ecx
push edx
call fcn.300120f0
mov dword [ebp + 0xf4], eax
mov eax, dword [ebp + 0x20]
add esp, 0x10
test eax, 0x100000
je 0x300129f6
mov eax, dword [ebp + 0xcc]
imul eax, dword [ebp + 0xd0]
push eax
lea ecx, [ebp + 0xc4]
push ecx
call fcn.300010c0
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x30012a28
mov edx, dword [ebp + 0xcc]
imul edx, dword [ebp + 0xd0]
push edx
lea eax, [ebp + 0xc8]
push eax
call fcn.300010c0
jmp 0x300129fe
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x30012a28
mov ecx, dword [ebp + 0xd8]
mov edx, dword [ebp + 0xd0]
imul ecx, dword [ebp + 0xd4]
imul edx, dword [ebp + 0xcc]
lea eax, [edx + ecx*2]
push eax
lea ecx, [ebp + 0xc0]
push ecx
call fcn.300010c0
mov edx, dword [ebp + 0xd8]
mov eax, dword [ebp + 0xd0]
imul edx, dword [ebp + 0xd4]
imul eax, dword [ebp + 0xcc]
mov ecx, dword [0x30058078]
mov edi, dword [ebp + 0x2a8]
lea eax, [eax + edx*2]
lea edx, [eax + ecx]
add edi, edx
mov dword [ebp + 0x2a8], edi
call fcn.300011c0
test eax, eax
mov dword [ebp + 0xbc], eax
je 0x30012b91
test esi, esi
je 0x30012a85
mov dword [ebp + 0xc0], eax
mov eax, dword [ebp + 0xc4]
mov dword [ebp + 0xc8], eax
mov ecx, dword [esp + 0x3e4]
test ecx, 0x1000000
je 0x30012ab0
mov eax, dword [0x30065258]
cmp eax, 0xffffffff
je 0x30012ab0
mov dword [ebp + 0x250], eax
mov dword [0x30065258], 0xffffffff
jmp 0x30012abc
mov edx, dword [ebp + 0xf4]
mov dword [ebp + 0x250], edx
test ecx, 0x400000
je 0x30012adc
mov eax, dword [0x3006525c]
cmp eax, 0xffffffff
je 0x30012adc
mov ebx, eax
mov dword [0x3006525c], 0xffffffff
jmp 0x30012ade
xor ebx, ebx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x30012b05
mov eax, dword [ebp + 0x10c]
mov ecx, dword [eax]
mov eax, dword [esp + 0x3e0]
and ecx, 0xfffffffe
add ecx, eax
mov dword [ebp + 0x108], ecx
jmp 0x30012c66
mov edx, dword [ebp + 0x250]
push edx
lea esi, [ebp + 0x110]
push esi
call dword [ebp + 0x118]
mov ecx, dword [ebp + 0x28]
mov edi, eax
lea edx, [ecx + ecx*8]
mov eax, 0xcccccccd
mul edx
shr edx, 3
cmp edi, edx
mov dword [ebp + 0x250], edi
mov eax, 0x2000
jb 0x30012b52
mov edi, dword [esp + 0x3e4]
mov edx, dword [ebp + 0x20]
or edi, eax
or edx, eax
mov dword [esp + 0x3e4], edi
mov dword [ebp + 0x20], edx
test dword [esp + 0x3e4], eax
je 0x30012c1f
mov eax, dword [ebp + 0x10c]
mov edx, dword [eax]
and edx, 0xfffffffe
sub ecx, edx
add ecx, 8
mov edi, ecx
mov eax, edi
mov ecx, ebp
call fcn.30011b70
test eax, eax
mov dword [ebp + 0x108], eax
jne 0x30012bdc
mov eax, dword [esp + 0x10c]
push eax
call sym.binkw32.dll__radfree_4
push ebp
call sym.binkw32.dll__radfree_4
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + str.Out_of_memory.]
mov byte [eax + 0x30055dc8], cl
inc eax
test cl, cl
jne 0x30012ba0
test dword [esp + 0x3e4], 0x4000000
jne 0x30012bcd
lea ecx, [esp + 0x160]
push ecx
call dword [esp + 0x178]
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x3cc
ret 8
mov edx, dword [ebp + 0x28]
push ebx
add edx, 8
push edx
push 0
push 0
push esi
call dword [ebp + 0x11c]
mov ecx, dword [ebp + 0x10c]
mov eax, dword [ebp + 0x108]
mov edx, dword [ecx]
push edi
push eax
and edx, 0xfffffffe
push edx
push 0
push esi
call dword [ebp + 0x114]
push esi
call dword [ebp + 0x124]
mov dword [ebp + 0x140], 0
jmp 0x30012c66
mov eax, dword [ebp + 0xe8]
push eax
lea ecx, [ebp + 0x104]
push ecx
call fcn.300010c0
mov eax, dword [ebp + 0x250]
mov ecx, ebp
call fcn.30011b70
test eax, eax
mov dword [ebp + 0x24c], eax
jne 0x30012c4f
mov dword [ebp + 0x250], eax
mov edx, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x250]
push ebx
add edx, 8
push edx
push ecx
push eax
push esi
call dword [ebp + 0x11c]
mov eax, dword [ebp + 0xdc]
mov edx, dword [ebp + 0xe4]
mov byte [edx + eax], 0
mov eax, dword [ebp + 0x14]
test eax, eax
mov dword [ebp + 0xc], 0xffffffff
je 0x30012caf
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], 0x7d0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mul ecx
mov ecx, dword [esp + 0x14]
div ecx
mov dword [ebp + 0x288], eax
jmp 0x30012cb9
mov dword [ebp + 0x288], 0x7d0
mov ebx, 1
mov eax, ebx
mov esi, ebp
mov dword [ebp + 0x2a4], ebx
call fcn.30011f70
call sym.binkw32.dll__RADTimerRead_0
mov ecx, dword [ebp + 0x2b8]
mov edx, dword [ebp + 0x300]
sub eax, ecx
mov dword [ebp + 0x2b8], eax
mov dword [edx + 0x68], 0x10000
mov eax, dword [ebp + 0xf0]
test eax, eax
mov dword [ebp + 0x2f8], 0
je 0x30012d5c
mov edi, dword [0x30065260]
test edi, edi
je 0x30012d5c
xor esi, esi
test edi, edi
jbe 0x30012d5c
mov ecx, dword [ebp + 0xf0]
xor eax, eax
test ecx, ecx
jle 0x30012d57
mov edx, dword [esi*4 + 0x30065264]
mov ecx, dword [ebp + 0x268]
lea ebx, [ebx]
cmp dword [ecx], edx
je 0x30012d42
inc eax
add ecx, 4
cmp eax, dword [ebp + 0xf0]
jl 0x30012d30
jmp 0x30012d57
mov ecx, dword [ebp + 0x2f8]
mov edx, dword [ebp + 0x25c]
mov dword [edx + ecx*4], eax
inc dword [ebp + 0x2f8]
inc esi
cmp esi, edi
jb 0x30012d11
xor eax, eax
mov dword [0x30065264], eax
cmp dword [ebp + 0x2f8], eax
mov dword [0x30065260], ebx
mov dword [esp + 0x10], eax
jbe 0x300130c0
xor ebx, ebx
jmp 0x30012d80
mov eax, dword [ebp + 0x300]
mov edi, dword [esp + 0x10]
mov dword [eax + ebx + 0x2c], 0
mov ecx, dword [ebp + 0x25c]
mov edx, dword [ecx + edi*4]
mov eax, dword [ebp + 0x264]
mov eax, dword [eax + edx*4]
test eax, 0x90000000
je 0x3001304d
mov ecx, dword [0x30065244]
test ecx, ecx
je 0x3001304d
mov ecx, dword [esp + 0x64]
mov esi, eax
and esi, 0xffff
test ecx, ecx
je 0x30012e4f
mov edx, dword [esp + 0x68]
test edx, edx
je 0x30012e4f
test esi, esi
mov dword [esp + 0x18], esi
fild dword [esp + 0x18]
jge 0x30012deb
fadd qword [0x3004feb8]
mov esi, dword [esp + 0x310]
fild dword [esp + 0x310]
test esi, esi
jge 0x30012e03
fadd qword [0x3004feb8]
test ecx, ecx
fmulp st(1)
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
jge 0x30012e17
fadd qword [0x3004feb8]
mov ecx, dword [esp + 0x30c]
fmulp st(1)
test ecx, ecx
fild dword [esp + 0x30c]
jge 0x30012e31
fadd qword [0x3004feb8]
test edx, edx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
jge 0x30012e43
fadd qword [0x3004feb8]
fmulp st(1)
fdivp st(1)
fistp qword [esp + 0x18]
mov esi, dword [esp + 0x18]
mov edx, dword [ebp + 0x20]
mov ecx, eax
push ebp
shr ecx, 0x1d
push edx
shr eax, 0x1e
and ecx, 1
and eax, 1
inc ecx
push ecx
lea edx, [eax*8 + 8]
mov eax, dword [ebp + 0x300]
push edx
push esi
add eax, ebx
push eax
call dword [0x30065244]
test eax, eax
je 0x3001304d
mov ecx, dword [ebp + 0x300]
lea eax, [ecx + ebx + 0x58]
cmp dword [eax], 0
jne 0x30012e99
mov dword [eax], 0xffffffff
mov edx, dword [ebp + 0x25c]
mov eax, dword [edx + edi*4]
mov ecx, dword [ebp + 0x260]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebp + 0x300]
add edx, 0xff
and edx, 0xffffff00
mov dword [eax + ebx + 0x28], edx
mov ecx, dword [ebp + 0x300]
mov eax, dword [ecx + ebx + 0x28]
mov edx, dword [0x30058078]
lea ecx, [eax + edx]
add dword [ebp + 0x2a8], ecx
call fcn.300011c0
mov edx, dword [ebp + 0x300]
mov dword [edx + ebx + 0x2c], eax
mov eax, dword [ebp + 0x300]
mov ecx, dword [eax + ebx + 0x2c]
add eax, ebx
test ecx, ecx
jne 0x30012f02
push eax
call dword [eax + 0x1c]
jmp 0x3001304d
mov ecx, dword [ebp + 0x25c]
inc dword [0x30065248]
mov edx, dword [ecx + edi*4]
mov ecx, dword [ebp + 0x264]
mov edx, dword [ecx + edx*4]
shr edx, 0x1b
and edx, 8
neg edx
sbb edx, edx
inc edx
mov dword [eax + 0x44], edx
mov eax, dword [ebp + 0x300]
mov edx, dword [eax + ebx + 0x28]
mov ecx, dword [eax + ebx + 0x2c]
add ecx, edx
mov dword [eax + ebx + 0x30], ecx
mov edx, dword [ebp + 0x300]
mov ecx, dword [edx + ebx + 0x2c]
add eax, ebx
mov dword [edx + ebx + 0x34], ecx
lea eax, [edx + ebx]
mov edx, dword [ebp + 0x300]
mov ecx, dword [edx + ebx + 0x2c]
mov dword [edx + ebx + 0x38], ecx
lea eax, [edx + ebx]
mov edx, dword [ebp + 0x300]
mov ecx, dword [edx + ebx + 0x64]
mov eax, 0x2ee
sub eax, ecx
mov ecx, dword [ebp + 0x25c]
mov edx, dword [ecx + edi*4]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x264]
mov ecx, dword [eax + edx*4]
shr ecx, 0x1d
and ecx, 1
inc ecx
imul ecx, esi
shl ecx, 1
mov dword [esp + 0x20], 0x3e8
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mul ecx
mov ecx, dword [esp + 0x20]
div ecx
mov edx, dword [ebp + 0x300]
and eax, 0xfffffffc
mov dword [edx + ebx + 0x4c], eax
mov eax, dword [ebp + 0x300]
mov ecx, dword [eax + ebx + 0x28]
mov edx, dword [eax + ebx + 0x4c]
add eax, ebx
cmp edx, ecx
jbe 0x30012fd3
mov dword [eax + 0x4c], ecx
mov ecx, dword [ebp + 0x25c]
mov edx, dword [ecx + edi*4]
mov eax, dword [ebp + 0x264]
mov ecx, dword [eax + edx*4]
test ecx, ecx
js 0x30012ff8
test ecx, 0x10000000
je 0x30012ff8
mov eax, 1
jmp 0x30012ffa
xor eax, eax
mov edx, ecx
shr edx, 0x1d
and edx, 1
push eax
inc edx
push edx
and ecx, 0xffff
call fcn.3001afd0
mov ecx, dword [ebp + 0x300]
mov dword [ecx + ebx + 0x3c], eax
mov ecx, dword [ebp + 0x2c0]
mov eax, dword [ebp + 0x2bc]
shl ecx, 2
xor edx, edx
lea eax, [eax + eax*2]
div ecx
mov edx, dword [ebp + 8]
sub edx, eax
mov eax, dword [ebp + 0x300]
mov dword [eax + ebx + 0x48], edx
mov ecx, dword [ebp + 0x300]
mov dword [ecx + ebx + 0x40], 0
mov edx, dword [ebp + 0x300]
mov ecx, dword [edx + ebx + 0x68]
test ecx, ecx
lea eax, [edx + ebx + 0x68]
jne 0x30013065
mov dword [eax], 0x10000
mov eax, dword [ebp + 0x300]
mov ecx, dword [eax + ebx + 0x2c]
test ecx, ecx
jne 0x300130a7
mov esi, dword [ebp + 0x2f8]
mov eax, dword [esp + 0x10]
mov edx, dword [ebp + 0x25c]
dec esi
mov ecx, esi
sub ecx, eax
shl ecx, 2
lea edi, [edx + eax*4]
mov edx, ecx
mov dword [ebp + 0x2f8], esi
shr ecx, 2
lea esi, [edi + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x300130b4
inc edi
mov dword [esp + 0x10], edi
add ebx, 0x178
mov eax, edi
cmp eax, dword [ebp + 0x2f8]
jb 0x30012d80
mov eax, dword [ebp + 0x2f8]
test eax, eax
je 0x30013129
mov eax, dword [0x30065250]
test eax, eax
mov dword [ebp + 0x2a0], 1
jne 0x300130f1
mov eax, 0xfffffff3
call fcn.3001b560
mov dword [0x30065250], eax
call fcn.3001ba00
mov edi, dword [0x30065250]
push 0
push 0
lea esi, [ebp + 0x34c]
push 0
mov dword [esi + 0x10], 0x30012280
mov dword [esi + 0x14], 0x300122a0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 4], eax
mov eax, dword [edi + 0x18]
mov dword [esi], eax
mov eax, dword [edi + 0x20]
inc eax
mov dword [edi + 0x18], esi
mov dword [edi + 0x20], eax
test dword [ebp + 0x20], 0x8000000
jne 0x30013174
mov eax, dword [ebp + 0x108]
test eax, eax
jne 0x30013174
mov eax, dword [0x3006524c]
test eax, eax
jne 0x30013159
mov eax, 5
call fcn.3001b560
mov dword [0x3006524c], eax
call fcn.3001ba00
mov edi, dword [0x3006524c]
lea esi, [ebp + 0x20c]
mov ecx, 0x300121d0
mov eax, 0x30012180
call fcn.3001b680
mov eax, dword [ebp + 0x108]
test eax, eax
mov dword [ebp + 0x204], 0x30012240
mov dword [ebp + 0x1fc], 0x300121f0
mov dword [ebp + 0x200], 0x30012210
mov dword [ebp + 0x208], 0x30012270
jne 0x300131cb
test dword [esp + 0x3e4], 0x200000
jne 0x300131cb
lea esi, [ebp + 0x110]
lea esp, [esp]
push esi
call dword [ebp + 0x120]
test eax, eax
jne 0x300131c0
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
add esp, 0x3cc
ret 8