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

Disassembly:
sub esp, 0x3fc
push ebx
mov ebx, dword [esp + 0x404]
push ebp
mov ebp, dword [esp + 0x40c]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov eax, dword [ebp + 0x44]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 8]
push esi
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x10]
mov esi, eax
push edi
test ch, 1
mov dword [esp + 0x44], edx
mov dword [esp + 0x10], esi
jne 0x491233
mov edx, eax
and edx, 0xfff83fff
mov dword [esp + 0x10], edx
mov esi, edx
test esi, 0x40000
je 0x49125c
or esi, 0x4000
test esi, 0x40000
mov dword [esp + 0x10], esi
je 0x49125c
test ah, 8
je 0x49125c
or esi, 0x8000
mov dword [esp + 0x10], esi
test esi, 0x4000
je 0x49126e
or esi, 0x10000
mov dword [esp + 0x10], esi
test esi, 0x8000
je 0x491283
and esi, 0xffffffbf
or esi, 0x20000
mov dword [esp + 0x10], esi
test esi, 0x20000
je 0x491295
and esi, 0xfffffeff
mov dword [esp + 0x10], esi
test esi, 0x10000
je 0x4912a7
and esi, 0xffffff7f
mov dword [esp + 0x10], esi
mov edx, dword [ebp + 8]
test dl, 4
jne 0x4912b9
and esi, 0xfffcfe7f
mov dword [esp + 0x10], esi
test cl, 2
jne 0x4912c8
and esi, 0xffff3baf
mov dword [esp + 0x10], esi
test cl, 0x40
je 0x4912d7
and esi, 0xffffcfff
mov dword [esp + 0x10], esi
test esi, 0x20000000
je 0x4912e9
and esi, 0xffff7fff
mov dword [esp + 0x10], esi
test esi, 0x2000000
je 0x4912fb
and esi, 0xffffbfff
mov dword [esp + 0x10], esi
xor eax, eax
mov ecx, 0x6a
lea edi, [esp + 0x64]
mov dword [esp + 0x40], eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x1c], eax
shr edx, 2
and edx, 1
mov dword [esp + 0x138], ecx
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x64]
mov edi, dword [esp + 0x48]
mov dword [esp + 0x13c], edx
mov edx, dword [ebx + 0x6c]
lea ecx, [esp + 0x24b]
and ecx, 0xffffffc0
mov dword [esp + 0xf8], eax
mov eax, dword [ebx + 0x78]
and esi, 0x1000
not edx
mov dword [esp + 0x1b8], ecx
mov ecx, dword [esp + 0x420]
and edx, 1
mov dword [esp + 0x144], esi
mov dword [esp + 0x1d0], eax
mov eax, dword [0x58e550]
mov dword [esp + 0x1c0], edx
mov edx, dword [ecx + 4]
xor esi, esi
mov dword [esp + 0x134], edi
cmp eax, esi
mov dword [esp + 0x128], edx
je 0x491395
call eax
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x18], esi
cmp ebx, esi
jbe 0x49180a
mov dword [esp + 0x4c], esi
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x30], 0
lea eax, [esi + esi*2]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
shl eax, 3
shl edi, 4
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], edi
mov eax, dword [esp + 0x34]
xor edx, edx
div ebx
mov ecx, dword [esp + 0x430]
xor edx, edx
mov dword [esp + 0x14], 0
imul eax, ebx
lea eax, [eax + ecx - 1]
div ecx
imul eax, esi
test esi, esi
mov dword [esp + 0x2c], eax
jbe 0x4917e5
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x5c]
mov edx, dword [esp + 0x30]
mov eax, ecx
add ecx, esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], ecx
jmp 0x491423
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x418]
lea esi, [eax + ecx]
mov ecx, dword [ebx + 0x44]
add ecx, eax
add eax, 0x1e8
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x410]
mov dword [esp + 0x54], ecx
lea edi, [esi + 0x144]
mov ecx, dword [eax + 8]
mov eax, dword [ebx + 0x38]
push edi
push ecx
mov ecx, dword [ebp + 0x38]
add eax, edx
add ecx, edx
push eax
push ecx
call dword [0x58e568]
mov edi, dword [edi]
mov dword [esi + 0x154], eax
mov eax, dword [esi + 0x148]
add esp, 0x10
cmp edi, eax
mov dword [esp + 0x20], edi
jg 0x491484
mov dword [esp + 0x20], eax
mov ecx, dword [esi + 0x14c]
mov edx, dword [esi + 0x150]
cmp ecx, edx
jg 0x491496
mov ecx, edx
cmp dword [esp + 0x20], ecx
jle 0x4914a4
cmp edi, eax
jle 0x4914b6
mov eax, edi
jmp 0x4914b6
mov eax, dword [esi + 0x14c]
mov ecx, dword [esi + 0x150]
cmp eax, ecx
jg 0x4914b6
mov eax, ecx
lea edx, [eax*4]
mov eax, dword [esp + 0x144]
test eax, eax
mov dword [esp + 0x20], edx
je 0x49155a
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
shr ebx, 1
mov edi, ebx
mov edx, dword [ebp + 0x40]
imul edi, dword [esp + 0x18]
add edi, eax
mov eax, dword [esp + 0x418]
add eax, 0x38
push ebx
shl edi, 3
mov ecx, dword [eax + 8]
add edx, edi
add ecx, edi
push ecx
push edx
call dword [0x58e564]
mov edx, dword [ebp + 0x3c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x424]
push ebx
add eax, 0x38
add edx, edi
mov ecx, dword [eax + 4]
add ecx, edi
push ecx
push edx
call dword [0x58e564]
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0x430]
add ecx, eax
add esp, 0x18
mov dword [esp + 0xf4], ecx
mov edx, dword [esi + 0x154]
add edx, ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x154], edx
mov eax, dword [esp + 0xf4]
add ecx, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x428]
push ecx
add ebx, 0x38
push edx
mov edx, dword [esp + 0x20]
lea edi, [ebp + 0x38]
push ebx
push edi
lea ecx, [esp + 0x74]
push eax
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x42c]
push eax
mov eax, dword [esp + 0x40]
push ecx
push esi
push ebp
push edx
push eax
call fcn.00493380
add esp, 0x34
test eax, eax
jne 0x4917b2
mov edx, dword [esp + 0x418]
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
mov eax, dword [edx + 0x44]
mov edx, dword [esp + 0x414]
push esi
push eax
push ecx
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x74]
push edx
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x444]
push eax
push ecx
mov ecx, dword [esp + 0x448]
mov eax, dword [edx]
push edi
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x44c]
push edx
mov ecx, dword [eax]
push ecx
push ebx
call fcn.00491d70
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
add esp, 0x3c
test ah, 1
je 0x491654
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x42c]
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push edi
push ecx
mov ecx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x42c]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
lea ecx, [esp + 0x94]
push esi
push ecx
call fcn.0049a210
jmp 0x4916d9
test ah, 0x10
je 0x49169a
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x42c]
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push edi
push ecx
mov ecx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x42c]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
lea ecx, [esp + 0x94]
push esi
push ecx
call fcn.0049d420
jmp 0x4916d9
mov edx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x42c]
push ecx
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push edi
push ecx
mov ecx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x42c]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
lea ecx, [esp + 0x94]
push esi
push ecx
call fcn.00491840
mov eax, dword [esp + 0x174]
add esp, 0x38
test eax, eax
lea edi, [esi + 0x124]
jne 0x4916ef
mov edi, esi
mov esi, dword [esi + 0xec]
mov eax, dword [esp + 0x40]
sub esi, 0
je 0x491764
sub esi, 2
jne 0x4917b2
mov ecx, dword [esp + 0x24]
mov esi, 3
add ecx, esi
mov dword [esp + 0x24], ecx
mov ecx, dword [edi + esi*8]
cmp ecx, eax
jle 0x491721
mov eax, ecx
jmp 0x49172c
or edx, 0xffffffff
sub edx, ecx
cmp edx, eax
jle 0x49172c
mov eax, edx
mov edx, ecx
mov ebx, dword [esp + 0x1c]
imul edx, ecx
mov ecx, dword [edi + esi*8 + 4]
add ebx, edx
cmp ecx, eax
mov dword [esp + 0x1c], ebx
jle 0x491747
mov eax, ecx
jmp 0x491752
or edx, 0xffffffff
sub edx, ecx
cmp edx, eax
jle 0x491752
mov eax, edx
mov edx, ecx
mov ebx, dword [esp + 0x1c]
imul edx, ecx
add ebx, edx
dec esi
mov dword [esp + 0x1c], ebx
jne 0x491716
mov ecx, dword [esp + 0x24]
mov edx, dword [edi + 4]
inc ecx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov ecx, dword [edi]
mov edi, edx
mov esi, ecx
imul edi, edx
imul esi, ecx
add edi, ebx
add edi, esi
cmp ecx, eax
mov dword [esp + 0x1c], edi
jle 0x491790
mov eax, ecx
jmp 0x49179b
or esi, 0xffffffff
sub esi, ecx
cmp esi, eax
jle 0x49179b
mov eax, esi
cmp edx, eax
jle 0x4917a3
mov eax, edx
jmp 0x4917ae
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, eax
jle 0x4917ae
mov eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
inc eax
add edx, 0x10
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], edx
jb 0x49141b
mov edi, dword [esp + 0x58]
mov ecx, dword [esp + 0x430]
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
add edx, ecx
inc eax
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
add edx, edi
cmp eax, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], edx
jb 0x4913d0
mov eax, dword [esp + 0x40]
push eax
call fcn.00490980
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x120], ecx
mov dword [ebp + 0x124], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3fc
ret