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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, ecx
mov dword [esp + 4], edx
push ebx
push esi
push edi
movzx edi, byte [eax + 0xa]
cmp byte [eax + 2], 0
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
lea ecx, [edi + edx]
je 0x42113a
mov esi, dword [eax + 0x1c]
mov ebx, dword [eax + 0x20]
mov eax, dword [eax + 0x10]
add ebx, esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], eax
cmp ebx, 0x80
jae 0x421072
mov byte [ecx], bl
mov eax, 1
jmp 0x4210cd
mov eax, ebx
cdq
mov ecx, eax
test edx, edx
ja 0x4210bc
jb 0x421082
cmp ecx, 0x7f
ja 0x421093
mov edx, dword [esp + 0x10]
and cl, 0x7f
mov eax, 1
mov byte [edx + edi], cl
jmp 0x4210cd
test edx, edx
ja 0x4210bc
jb 0x4210a1
cmp ecx, 0x3fff
ja 0x4210bc
shrd eax, edx, 7
mov edx, dword [esp + 0x10]
or al, 0x80
and cl, 0x7f
mov byte [edx + edi], al
mov eax, 2
mov byte [edx + edi + 1], cl
jmp 0x4210cd
push edx
push ecx
mov ecx, dword [esp + 0x18]
lea ecx, [edi + ecx]
call fcn.00409570
add esp, 8
mov edx, dword [ebp + 8]
movzx eax, al
add edi, eax
mov eax, dword [esp + 0x10]
add eax, edi
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
test edx, edx
ja 0x421129
jb 0x4210ec
cmp ecx, 0x7f
ja 0x4210fb
and cl, 0x7f
mov byte [eax], cl
mov eax, 1
jmp 0x4211be
test edx, edx
ja 0x421129
jb 0x421109
cmp ecx, 0x3fff
ja 0x421129
mov eax, ecx
shrd eax, edx, 7
mov edx, dword [esp + 0x10]
or al, 0x80
and cl, 0x7f
mov byte [edi + edx], al
mov eax, 2
mov byte [edi + edx + 1], cl
jmp 0x4211be
push edx
push ecx
mov ecx, eax
call fcn.00409570
add esp, 8
jmp 0x4211be
mov ebx, dword [eax + 8]
mov esi, ebx
mov eax, dword [eax]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
cmp ebx, 0x80
jae 0x42115e
mov byte [ecx], bl
mov eax, 1
jmp 0x4211bb
mov eax, ebx
cdq
mov ecx, eax
test edx, edx
ja 0x4211aa
jb 0x42116e
cmp ecx, 0x7f
ja 0x42117f
mov edx, dword [esp + 0x10]
and cl, 0x7f
mov eax, 1
mov byte [edx + edi], cl
jmp 0x4211bb
test edx, edx
ja 0x4211aa
jb 0x42118d
cmp ecx, 0x3fff
ja 0x4211aa
shrd eax, edx, 7
mov edx, dword [esp + 0x10]
mov esi, ebx
or al, 0x80
and cl, 0x7f
mov byte [edx + edi], al
mov eax, 2
mov byte [edx + edi + 1], cl
jmp 0x4211bb
push edx
push ecx
mov ecx, dword [esp + 0x18]
lea ecx, [edi + ecx]
call fcn.00409570
add esp, 8
movzx eax, al
mov ecx, dword [esp + 0x30]
add edi, eax
mov dword [esp + 0x28], edi
add edi, dword [esp + 0x10]
movzx eax, word [ecx + 0xe]
mov dword [esp + 0x30], eax
cmp ebx, eax
jg 0x421215
mov ecx, dword [esp + 0x28]
mov eax, 4
add ecx, ebx
cmp ecx, eax
push esi
push dword [esp + 0x20]
cmovl ecx, eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [eax], ecx
call fcn.004f79b0
add esp, 0xc
lea eax, [edi + esi]
sub ebx, esi
push ebx
push 0
push eax
call fcn.004f7f30
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx esi, word [ecx + 0x10]
xor edx, edx
mov ecx, dword [ecx + 0x34]
mov eax, ebx
sub eax, esi
mov dword [esp + 0x14], ecx
mov ecx, dword [ecx + 0x24]
sub ecx, 4
div ecx
lea eax, [edx + esi]
mov edx, dword [esp + 0x28]
cmp eax, dword [esp + 0x30]
cmovle esi, eax
mov eax, dword [ebp + 0xc]
add edx, esi
lea ecx, [edx + 4]
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
add eax, edx
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x2c], ebx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], esi
nop dword [eax + eax]
cmp eax, dword [esp + 0x20]
cmovle esi, eax
cmp ecx, esi
jl 0x421288
push esi
push dword [esp + 0x20]
push edi
call fcn.004f79b0
jmp 0x4212a4
test ecx, ecx
jle 0x42129b
push ecx
push dword [esp + 0x20]
mov esi, ecx
push edi
call fcn.004f79b0
jmp 0x4212a4
push esi
push 0
push edi
call fcn.004f7f30
mov eax, dword [esp + 0x30]
add esp, 0xc
sub eax, esi
mov dword [esp + 0x24], eax
test eax, eax
jle 0x421504
mov ecx, dword [esp + 0x18]
add edi, esi
add dword [esp + 0x1c], esi
sub ecx, esi
sub dword [esp + 0x20], esi
mov esi, dword [esp + 0x20]
mov dword [esp + 0x18], ecx
jne 0x421270
mov ecx, dword [esp + 0x14]
mov esi, ebx
mov dword [esp + 0x20], 0
mov dword [esp + 0x34], esi
cmp byte [ecx + 0x11], 0
je 0x42135e
mov eax, dword [ecx + 0x20]
mov edi, esi
mov dword [esp + 0x10], eax
lea ebx, [edi + 1]
mov dword [esp + 0x2c], ebx
mov edi, ebx
cmp ebx, 2
jae 0x421306
xor ecx, ecx
jmp 0x42133e
mov eax, 0xcccccccd
lea esi, [ebx - 2]
mul dword [ecx + 0x24]
mov eax, esi
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [0x55b1cc]
sub esi, edx
xor edx, edx
div dword [ecx + 0x20]
xor ecx, ecx
dec eax
cmp esi, eax
mov eax, dword [esp + 0x10]
sete cl
add esi, 2
add ecx, esi
cmp ecx, ebx
mov esi, eax
mov ecx, dword [esp + 0x14]
je 0x4212f4
mov eax, dword [0x55b1cc]
xor edx, edx
div esi
inc eax
cmp ebx, eax
mov eax, dword [esp + 0x10]
je 0x4212f4
mov esi, dword [esp + 0x34]
push 0
lea eax, [esp + 0x30]
push ebx
push eax
lea edx, [esp + 0x2c]
call fcn.0041fc40
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x10], eax
cmp byte [ecx + 0x11], 0
je 0x421401
test eax, eax
jne 0x421499
lea eax, [esp + 0x10]
test esi, esi
push eax
setne al
mov edx, ebx
add al, 3
movzx eax, al
push esi
push eax
call fcn.00419f80
mov esi, dword [esp + 0x1c]
add esp, 0xc
test esi, esi
je 0x42140d
mov eax, dword [esp + 0x20]
test eax, eax
je 0x421405
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x421467
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x421499
mov ecx, dword [esp + 0x30]
mov eax, ebx
bswap eax
mov dword [ecx], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x421477
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x421470
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x421477
mov ecx, edx
call fcn.0040f8d0
jmp 0x421405
mov ecx, edx
call fcn.0040f8d0
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx + 0x38]
mov dword [eax], 0
mov edi, dword [edx + 0x38]
mov esi, dword [ecx + 0x24]
add edi, 4
sub esi, 4
jmp 0x421254
mov edx, dword [esp + 0x28]
test edx, edx
je 0x4214f9
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x4214f2
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov eax, dword [esp + 0x20]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call fcn.0040f8d0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x28]
test edx, edx
je 0x421562
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x42155b
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004f4a20
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call fcn.0040f8d0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret