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

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
mov esi, dword [esp + 0x30]
xor ebp, ebp
push edi
xor edi, edi
mov dword [esp + 0x10], edi
cmp dword [esi + 0x3c], edi
je 0x49bed3
mov edi, dword [ebx + 4]
mov dword [ebx + 4], ebp
movzx eax, word [esi + 0x72]
push eax
push ebx
push esi
call fcn.0049c7b0
add esp, 0xc
mov dword [ebx + 4], edi
test eax, eax
jne 0x49c2e0
lea eax, [ebp + 1]
xor edi, edi
jmp 0x49bf00
mov dword [ebx], 0xffffffff
movzx eax, word [esi + 0x72]
push eax
push ebx
push esi
call fcn.0049c7b0
add esp, 0xc
mov dword [ebx], edi
test eax, eax
je 0x49befe
cmp dword [esi + 0x50], edi
je 0x49c2e0
mov eax, 1
jmp 0x49bf00
xor eax, eax
movzx ecx, word [esi + 0x7e]
dec ecx
mov dword [esp + 0x34], ecx
test eax, eax
je 0x49bf86
mov eax, dword [esi + 0x78]
shl ecx, 3
mov dword [esp + 0x20], ecx
push dword [eax + ecx]
push esi
call fcn.00499000
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x49c2e0
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x78]
movsx ecx, word [ecx + eax + 4]
movzx ecx, word [ebp + ecx*2 + 0x1a]
mov eax, dword [ecx + ebp + 0x18]
mov dword [esp + 0x20], eax
test eax, eax
je 0x49bf86
push ebp
push esi
call fcn.00499280
push dword [esp + 0x28]
push esi
call fcn.00498b20
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x49c2e0
movzx ecx, word [esi + 0x7e]
mov eax, dword [esi + 0x78]
dec ecx
mov dword [esp + 0x34], ecx
lea ecx, [eax + ecx*8]
movzx eax, word [ecx + 4]
cmp ax, word [ebp + 0xc]
jge 0x49bf86
inc eax
mov word [ecx + 4], ax
movzx eax, word [esi + 0x72]
push eax
push ebx
push dword [esi + 0x84]
call fcn.00497580
mov dword [esi + 0x84], eax
add esp, 0xc
mov eax, dword [esp + 0x34]
test eax, eax
js 0x49c202
nop dword [eax]
test ebx, ebx
je 0x49c202
test ebp, ebp
je 0x49bfca
push ebp
push esi
call fcn.00499280
mov eax, dword [esp + 0x3c]
add esp, 8
lea ecx, [eax*8]
mov eax, dword [esi + 0x78]
mov dword [esp + 0x18], ecx
push dword [eax + ecx]
push esi
call fcn.00499000
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x49c2cd
mov edx, dword [esi + 0x78]
add edx, dword [esp + 0x18]
movzx ecx, word [edx + 4]
mov eax, ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov ax, word [ebp + 0xc]
cmp ax, word [esi + 0x76]
jae 0x49c02c
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push ecx
push ebp
push esi
call fcn.00498f10
add esp, 0x18
xor ebx, ebx
jmp 0x49c1f1
mov ecx, dword [esp + 0x34]
xor eax, eax
mov word [esi + 0x7e], ax
test ecx, ecx
jle 0x49c1c9
push dword [edx - 8]
push esi
call fcn.00499000
mov edi, eax
add esp, 8
test edi, edi
je 0x49c2a8
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x78]
movzx ecx, word [ecx + eax - 4]
mov eax, ecx
mov edx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
cmp cx, word [edi + 0xc]
jae 0x49c092
movzx eax, word [edi + eax*2 + 0x1c]
cmp dword [eax + edi + 0x18], 0
je 0x49c08e
lea eax, [ecx + 1]
movzx eax, ax
mov dword [esp + 0x14], eax
jmp 0x49c0b9
mov eax, dword [esp + 0x20]
test cx, cx
je 0x49c1c9
movzx eax, word [edi + eax*2 + 0x18]
cmp dword [eax + edi + 0x18], 0
je 0x49c1c9
lea eax, [ecx - 1]
movzx edx, ax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
cmp dx, ax
je 0x49c1c9
cmp dx, cx
jne 0x49c0f8
mov eax, dword [esp + 0x14]
movzx eax, ax
mov dword [esp + 0x18], ebp
movzx eax, word [edi + eax*2 + 0x1a]
push dword [eax + edi + 0x18]
push esi
call fcn.00499000
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x49c27c
mov ecx, dword [esp + 0x24]
mov edx, ebp
jmp 0x49c12c
movzx eax, dx
mov dword [esp + 0x14], ebp
movzx eax, word [edi + eax*2 + 0x1a]
push dword [eax + edi + 0x18]
push esi
call fcn.00499000
mov edx, eax
add esp, 8
mov dword [esp + 0x18], edx
test edx, edx
je 0x49c27c
mov cx, word [edx + 0xc]
mov eax, ebp
inc cx
add cx, word [esp + 0x28]
movzx ecx, cx
mov dword [esp + 0x20], ecx
movzx ecx, cx
mov dword [esp + 0x28], ecx
movzx ecx, word [eax + 0xc]
movzx eax, word [edx + 0xc]
add ecx, eax
movzx eax, word [esi + 0x76]
lea eax, [eax*2 - 2]
cmp ecx, eax
jg 0x49c1ab
push dword [esp + 0x14]
push edx
push dword [esp + 0x24]
push edi
push esi
call fcn.00495e30
mov eax, dword [esp + 0x2c]
add esp, 0x14
movzx edx, word [eax + 0xc]
mov ecx, edx
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
cmp dx, cx
jae 0x49c180
sub ecx, edx
dec ecx
lea edx, [ebx + 8]
movzx ecx, cx
push edx
push dword [ebx + 4]
push dword [ebx]
push ecx
mov ecx, dword [esp + 0x38]
cmp word [esp + 0x34], cx
cmovb eax, dword [esp + 0x24]
push eax
push esi
call fcn.00498f10
mov edx, dword [esp + 0x30]
add esp, 0x18
xor ebx, ebx
mov eax, dword [esp + 0x14]
cmp edx, ebp
cmovne eax, edx
push eax
push esi
call fcn.00499280
push edi
push esi
call fcn.00499280
add esp, 0x10
test ebx, ebx
je 0x49c202
push dword [esp + 0x2c]
push ebx
push ebp
push esi
call fcn.00499370
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x10]
test eax, eax
je 0x49c1eb
push eax
call fcn.00434080
add esp, 4
mov edi, ebx
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x34]
sub eax, 1
mov dword [esp + 0x34], eax
jns 0x49bfb0
push ebp
push esi
call fcn.00499280
add esp, 8
test ebx, ebx
je 0x49c25e
push 0
push esi
call fcn.00499200
mov edi, eax
add esp, 8
test edi, edi
je 0x49c2e0
lea eax, [ebx + 8]
push eax
push dword [ebx + 4]
push dword [ebx]
push 0
push edi
push esi
call fcn.00498f10
movzx ecx, word [edi + 0x1c]
mov eax, dword [esi + 0x68]
push edi
push esi
mov dword [ecx + edi + 0x18], eax
mov eax, dword [edi]
mov dword [esi + 0x68], eax
mov dword [esi + 0x58], 1
call fcn.00499280
add esp, 0x20
xor eax, eax
mov word [esi + 0x7e], ax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x49c26f
push eax
call fcn.00434080
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
push ebp
push esi
call fcn.00499280
push edi
push esi
call fcn.00499280
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x49c2e0
push eax
call fcn.00434080
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push ebp
push esi
call fcn.00499280
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x49c2e0
push eax
call fcn.00434080
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
je 0x49c2da
push edi
call fcn.00434080
add esp, 4
xor eax, eax
mov word [esi + 0x7e], ax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret