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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x38]
push edi
mov dword [esp + 0x14], ecx
cmp byte [esi + 0x42], 4
mov edi, dword [esi]
mov dword [esp + 0x1c], 0
mov eax, dword [edi + 4]
mov dword [esp + 0x10], eax
jne 0x499167
mov eax, dword [esi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test byte [esi + 0x40], 0x20
je 0x49918d
mov edx, dword [esi + 0x34]
mov ecx, eax
push esi
call fcn.00491040
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x499376
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x18]
cmp dword [esi + 0x48], 0
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
jne 0x499224
cmp byte [edi + 0xb], 0
je 0x4991d2
mov eax, dword [edi + 4]
mov byte [edi + 0xb], 0
mov eax, dword [eax + 8]
test eax, eax
je 0x4991d2
test byte [eax + 0x40], 0x10
je 0x4991cb
mov byte [edi + 0xb], 1
cmp dword [eax + 0x10], ebp
jne 0x4991cb
cmp dword [eax + 0x14], ebx
jne 0x4991cb
mov byte [eax + 0x42], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x4991b3
test byte [esi + 0x40], 2
je 0x4991fb
test ebx, ebx
jl 0x4991fb
jg 0x4991e2
test ebp, ebp
je 0x4991fb
mov eax, ebp
mov edx, ebx
sub eax, 1
sbb edx, 0
cmp dword [esi + 0x10], eax
jne 0x4991fb
cmp dword [esi + 0x14], edx
jne 0x4991fb
or eax, 0xffffffff
jmp 0x49924b
test ecx, ecx
jne 0x49924f
lea eax, [esp + 0x14]
xor edx, edx
push eax
push dword [esp + 0x3c]
mov ecx, esi
push ebx
push ebp
call fcn.00495500
mov ecx, eax
add esp, 0x10
test ecx, ecx
je 0x499247
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test ecx, ecx
jne 0x49924f
lea eax, [esp + 0x14]
mov ecx, esi
push eax
push dword [esp + 0x3c]
push ebx
push ebp
call fcn.00491120
mov ecx, eax
add esp, 0x10
test ecx, ecx
jne 0x499376
mov eax, dword [esp + 0x14]
mov dword [esp + 0x3c], eax
movsx eax, byte [esi + 0x44]
lea ecx, [esp + 0x1c]
push ecx
push dword [esp + 0x38]
push dword [esp + 0x38]
mov edi, dword [esi + eax*4 + 0x78]
mov ecx, edi
push dword [esp + 0x38]
mov eax, dword [esp + 0x20]
push ebx
push ebp
push dword [esp + 0x30]
mov eax, dword [eax + 0x50]
mov edx, eax
mov dword [esp + 0x2c], eax
call fcn.00496990
mov ecx, eax
add esp, 0x1c
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x499376
movsx eax, byte [esi + 0x44]
movzx edx, word [esi + eax*2 + 0x50]
lea ecx, [esi + eax*2]
mov eax, dword [esp + 0x3c]
mov ebx, edx
test eax, eax
jne 0x499315
mov ecx, dword [edi + 0x48]
call fcn.0048dd70
mov ecx, eax
test ecx, ecx
jne 0x499376
mov eax, dword [edi + 0x40]
mov ebp, dword [esp + 0x10]
mov ax, word [eax + ebx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x14]
movzx edx, cx
and edx, eax
add edx, dword [edi + 0x38]
cmp byte [edi + 5], 0
jne 0x4992e1
mov eax, dword [edx]
mov dword [ebp], eax
lea eax, [esp + 0x3c]
mov ecx, edi
push eax
call fcn.004967e0
add esp, 4
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov edx, ebx
mov ecx, edi
push eax
movzx eax, word [esp + 0x40]
push eax
call fcn.00496d50
mov ecx, dword [esp + 0x1c]
add esp, 8
test ecx, ecx
jne 0x499376
jmp 0x49932c
mov ebp, dword [esp + 0x10]
jns 0x49932c
cmp word [edi + 0x12], 0
jbe 0x49932c
lea eax, [edx + 1]
mov word [ecx + 0x50], ax
movzx ebx, ax
lea eax, [esp + 0x14]
mov edx, ebx
push eax
push 0
push 0
push dword [esp + 0x28]
mov ecx, edi
push ebp
call fcn.00496e70
mov ecx, dword [esp + 0x28]
xor eax, eax
add esp, 0x14
mov word [esi + 0x24], ax
test ecx, ecx
jne 0x499376
cmp byte [edi + 1], al
je 0x499376
and byte [esi + 0x40], 0xfd
mov ecx, esi
call fcn.00498f70
mov ecx, eax
movsx eax, byte [esi + 0x44]
mov eax, dword [esi + eax*4 + 0x78]
mov byte [eax + 1], 0
mov byte [esi + 0x42], 0
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x10
ret