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

Disassembly:
sub esp, 0x54
push edi
mov edi, dword [esp + 0x68]
mov eax, ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov dword [ecx], 0
test edi, edi
ja 0x4921d0
mov ecx, dword [esp + 0x6c]
push 0
push 0
call fcn.0040b700
pop edi
add esp, 0x54
ret 0x24
mov ecx, dword [eax + 0x1dc]
mov eax, dword [eax + 0x1fc]
mov edx, 1
shl edx, cl
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edx
cmp edx, eax
ja 0x4921f3
mov dword [esp + 0xc], eax
push ebp
mov ebp, dword [esp + 0x70]
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x492204
call fcn.004109a0
mov edx, dword [esp + 0x7c]
push ebx
push esi
mov ecx, ebp
mov dword [esp + 0x14], eax
xor esi, esi
mov byte [edx], 0
call fcn.0040c140
test al, al
jne 0x4924b5
mov ebx, dword [esp + 0x7c]
mov eax, ebx
and eax, 0x10
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], 1
jmp 0x492248
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x492283
test bl, 1
je 0x492262
mov eax, 0x2b830000
push eax
push 0
mov ecx, ebp
call fcn.0040b700
jmp 0x4922aa
mov eax, ebx
and al, 0x80
movsx eax, al
neg eax
sbb eax, eax
and eax, 0x10000
add eax, 0x2b810000
push eax
push 0
mov ecx, ebp
call fcn.0040b700
jmp 0x4922aa
mov ecx, dword [esp + 0x80]
mov edx, dword [ecx]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
push edx
mov edx, dword [esp + 0x6c]
push ebx
push ebp
push edi
push eax
push ecx
mov ecx, dword [esp + 0x28]
push edx
call fcn.00491e10
mov esi, eax
cmp esi, edi
jbe 0x4922b0
mov esi, edi
test esi, esi
jbe 0x4922f8
cmp esi, edi
jae 0x4922c1
mov eax, dword [esp + 0x20]
dec eax
not eax
and esi, eax
test esi, esi
jbe 0x4922f8
mov eax, dword [ebp + 0x48]
mov ecx, ebx
and cl, 0x60
xor edx, edx
cmp cl, 0x20
sete dl
add edx, 4
mov ecx, edx
test eax, eax
je 0x4922f8
cmp ecx, 4
jne 0x4922e9
test byte [ebp + 0x14], 0x80
jne 0x4922f8
push esi
push dword [esp + 0x6c]
push ecx
push eax
lea ecx, [ebp + 0x30]
call fcn.00410d70
cmp esi, edi
je 0x49256e
mov eax, dword [ebp + 0x4c]
mov edx, eax
and edx, 0x80000000
mov ecx, eax
je 0x492317
and ecx, 0xff000000
jmp 0x49231d
and ecx, 0xffff0000
cmp ecx, 0x2b850000
je 0x492578
mov ecx, eax
test edx, edx
je 0x492337
and ecx, 0xff000000
jmp 0x49233d
and ecx, 0xffff0000
cmp ecx, 0x2b890000
je 0x492578
test edx, edx
je 0x492354
and eax, 0xff000000
jmp 0x492359
and eax, 0xffff0000
cmp eax, 0x120000
jne 0x492369
test bl, 2
jne 0x492578
mov eax, dword [esp + 0x10]
add eax, 0x38
push eax
test bl, 1
mov eax, 0
setne al
push ebp
lea ecx, [esp + 0x34]
inc eax
push eax
call fcn.0040bfd0
xor ecx, ecx
mov eax, esi
add eax, dword [esp + 0x6c]
mov edx, edi
adc ecx, dword [esp + 0x70]
sub edx, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x40], ecx
mov ecx, dword [edx + 0x1dc]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x68]
xor edi, edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], eax
mov edi, ebx
and edi, 0x20
lea eax, [esi + ecx]
mov byte [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x50], eax
je 0x4923e8
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], ecx
jmp 0x4923f4
mov eax, dword [esp + 0x7c]
neg eax
sbb eax, eax
mov dword [esp + 0x54], eax
mov eax, dword [edx + 0x1c8]
test eax, eax
jne 0x492410
call fcn.004175a0
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x58], ecx
jmp 0x492415
dec eax
mov dword [esp + 0x58], eax
test byte [ebp + 0x14], 0x20
je 0x492423
mov dword [esp + 0x58], 0
mov eax, dword [edx + 0x1cc]
mov dword [esp + 0x5c], eax
test eax, eax
jne 0x49244a
test byte [edx + 0x1c4], 0x40
mov dword [esp + 0x5c], 1
jne 0x49244a
mov dword [esp + 0x5c], 3
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
call dword [esp + 0x1c]
mov ecx, eax
add esp, 8
mov dword [esp + 0x1c], ecx
cmp ecx, 2
jne 0x492499
mov eax, dword [esp + 0x28]
test dword [esp + 0x5c], eax
je 0x492479
mov edx, dword [esp + 0x80]
mov dword [edx], eax
cmp byte [esp + 0x24], 0
je 0x492499
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x1b0]
mov edx, dword [eax + 0x14]
add ecx, 0x1b0
call edx
mov ecx, dword [esp + 0x1c]
test edi, edi
je 0x4924c1
cmp ecx, 2
jne 0x4924c1
inc dword [esp + 0x78]
mov ecx, ebp
call fcn.0040c140
test al, al
je 0x492240
pop esi
pop ebx
pop ebp
xor eax, eax
pop edi
add esp, 0x54
ret 0x24
mov ecx, dword [esp + 0x74]
mov eax, dword [ebp + 0x4c]
sub ecx, esi
cmp ecx, dword [esp + 0x18]
seta dl
test eax, eax
jns 0x4924dc
and eax, 0xff000000
jmp 0x4924e1
and eax, 0xffff0000
cmp eax, 0x2b820000
jne 0x4924f4
xor eax, eax
test dl, dl
sete al
add eax, 0x10
jmp 0x4924fe
xor eax, eax
test dl, dl
sete al
add eax, 0x12
mov edx, dword [esp + 0x88]
mov dword [edx], eax
mov edx, dword [ebp + 0x48]
test edx, edx
je 0x492520
push ecx
mov ecx, dword [esp + 0x6c]
add ecx, esi
push ecx
push eax
push edx
lea ecx, [ebp + 0x30]
call fcn.00410d70
mov eax, dword [esp + 0x1c]
sub eax, 1
je 0x492544
sub eax, 1
jne 0x492578
mov edx, dword [esp + 0x84]
mov eax, esi
pop esi
pop ebx
pop ebp
mov byte [edx], 1
pop edi
add esp, 0x54
ret 0x24
test bl, 1
jne 0x49255d
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x68]
push ebp
push esi
push eax
push ecx
call fcn.0040b760
add esp, 0x10
mov esi, dword [esp + 0x74]
xor edx, edx
mov dword [ebp + 0x4c], 0
mov word [ebp + 0x50], dx
mov eax, dword [esp + 0x84]
mov byte [eax], 1
mov eax, esi
pop esi
pop ebx
pop ebp
pop edi
add esp, 0x54
ret 0x24