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

Disassembly:
sub esp, 0x58
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
push ebx
push ebp
mov edx, dword [edx]
mov ebx, edx
mov eax, dword [eax]
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x58], eax
lea eax, [ebx + 6]
mov dword [esp + 0x5c], edx
push esi
mov dword [esp + 0x98], eax
cmp byte [edx], 0x85
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x10], 0xfffffffe
mov dword [esp + 0x28], 0xfffffffe
jne 0x499ac5
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 4]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x58], eax
xor eax, eax
mov word [esp + 0x5e], ax
lea eax, [esp + 0x58]
mov dword [esp + 0x40], ecx
mov word [esp + 0x5c], cx
mov dword [ebp + 0x24], eax
mov esi, dword [esp + 0xa4]
lea eax, [edx + 1]
mov byte [eax], 0
lea ecx, [esp + 0x9c]
add ebx, 3
mov dword [esp + 0x50], eax
lea eax, [edx + 2]
add ebx, edx
xor edx, edx
mov byte [eax], 0
mov edi, dword [ebp + 0x40]
test esi, esi
mov dword [esp + 0x54], eax
mov eax, edi
cmove ecx, edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
cmp dword [esp + 0x80], 0
mov dword [esp + 0x1c], ebx
je 0x499b11
mov dword [ebp + 0x40], eax
cmp dword [esp + 0x7c], 0
je 0x499b3d
lea esi, [ebx + 1]
mov byte [ebx], 0x7c
lea eax, [esi + 2]
mov word [esi], 0
add dword [esp + 0x9c], 3
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0xa4]
mov dword [esp + 0x1c], eax
push ecx
push ebp
push dword [esp + 0x90]
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0xb0]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x98]
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.004954f0
add esp, 0x30
test eax, eax
je 0x499d60
mov eax, dword [ebp + 0x40]
cmp eax, edi
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
cmovbe eax, edi
mov dword [esp + 0x44], eax
test esi, esi
jne 0x499cc1
cmp byte [edx], 0x77
je 0x499bd4
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jmp 0x499c67
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
test ecx, ecx
js 0x499c15
cmp ecx, esi
jne 0x499bee
cmp dword [esp + 0x24], edi
je 0x499c33
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x28], 0xffffffff
cmovns ecx, eax
cmp dword [esp + 0x10], 0
mov eax, dword [esp + 0x24]
cmovge eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
test esi, esi
js 0x499c33
mov ecx, dword [esp + 0xa0]
test ecx, ecx
jns 0x499c3a
mov ecx, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0xa0], ecx
jmp 0x499c3a
mov ecx, dword [esp + 0xa0]
mov esi, dword [esp + 0x10]
mov eax, ecx
xor eax, esi
test eax, 0xfffffffd
jne 0x499c5f
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x18], eax
jne 0x499c5f
or esi, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jmp 0x499c67
mov dword [esp + 0x10], 0xffffffff
cmp dword [esp + 0x7c], 0
je 0x499cba
mov eax, dword [esp + 0x6c]
push ebp
shr eax, 0xb
push 0
and eax, 1
mov byte [ebx], 0
push eax
push edx
call fcn.0049a5a0
mov ecx, eax
add esp, 0x10
cmp ecx, 0xfffffffd
jne 0x499c98
mov dword [ebp + 0x74], 1
jmp 0x499cb6
test ecx, ecx
js 0x499d40
cmp ecx, dword [ebp + 0x48]
jle 0x499ca8
mov dword [ebp + 0x48], ecx
mov edx, dword [esp + 0x3c]
mov eax, ecx
sar eax, 8
mov byte [edx], al
mov byte [edx + 1], cl
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0x20]
cmp byte [edi], 0x7c
jne 0x499d74
test esi, esi
je 0x499d02
mov eax, dword [esp + 0x70]
mov ebx, dword [esp + 0x84]
add dword [esp + 0x9c], 3
add ebx, 3
mov ecx, dword [esp + 0x4c]
mov eax, dword [eax]
add ebx, eax
mov eax, dword [esp + 0x48]
inc edi
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x44]
jmp 0x499b00
mov ecx, dword [esp + 0x4c]
mov eax, ebx
sub eax, edx
mov byte [ebx], 0x77
sar eax, 8
mov esi, ebx
mov byte [ebx + 1], al
mov al, bl
sub al, dl
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0xa4]
mov byte [ebx + 2], al
mov eax, dword [esp + 0x48]
mov dword [esp + 0x64], ebx
add ebx, 3
inc edi
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x44]
jmp 0x499b00
cmp ecx, 0xfffffffe
jne 0x499d4a
lea eax, [ecx + 0x26]
jmp 0x499d5a
cmp ecx, 0xfffffffc
mov eax, 0x19
mov edx, 0x46
cmove eax, edx
mov ecx, dword [esp + 0x78]
mov dword [ecx], eax
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [ecx], eax
xor eax, eax
pop ebx
add esp, 0x58
ret
test esi, esi
jne 0x499da0
mov esi, dword [esp + 0x14]
mov edx, ebx
sub edx, esi
movzx ecx, byte [esi + 1]
movzx eax, byte [esi + 2]
shl ecx, 8
or ecx, eax
mov byte [esi + 2], dl
mov eax, edx
mov edx, ecx
sar eax, 8
mov byte [esi + 1], al
sub esi, edx
test ecx, ecx
jne 0x499d80
mov ecx, dword [esp + 0x30]
mov eax, ebx
sub eax, ecx
mov byte [ebx], 0x78
sar eax, 8
mov byte [ebx + 1], al
mov al, bl
sub al, cl
mov byte [ebx + 2], al
add ebx, 3
cmp dword [esp + 0x40], 0
jbe 0x499e38
mov eax, dword [ebp + 0x24]
cmp word [eax + 6], 0
je 0x499e2a
mov eax, ebx
sub eax, ecx
push eax
push ecx
lea eax, [ecx + 3]
push eax
call fcn.0049c250
mov eax, dword [esp + 0x3c]
lea edx, [ebx + 3]
mov esi, dword [esp + 0x60]
mov ecx, edx
mov ebx, dword [esp + 0x3c]
sub ecx, eax
sar ecx, 8
add esp, 0xc
mov byte [eax], 0x81
mov eax, dword [esp + 0x50]
mov byte [eax], cl
mov al, dl
sub al, bl
lea ebx, [edx + 3]
mov byte [esi], al
mov byte [edx], 0x78
mov byte [edx + 1], cl
mov byte [edx + 2], al
mov ecx, dword [esp + 0x9c]
mov eax, dword [ebp + 0x24]
add ecx, 6
mov dword [esp + 0x9c], ecx
mov eax, dword [eax]
mov dword [ebp + 0x24], eax
jmp 0x499e3f
mov eax, dword [eax]
mov ecx, dword [esp + 0x9c]
mov dword [ebp + 0x24], eax
jmp 0x499e3f
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x24]
mov dword [ebp + 0x40], eax
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x28]
mov dword [eax], ebx
mov eax, dword [esp + 0x74]
mov dword [eax], edi
mov eax, dword [esp + 0x8c]
mov dword [eax], edx
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x18]
mov dword [eax], esi
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0xa4]
mov dword [eax], edx
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0x10]
mov dword [eax], edx
test esi, esi
je 0x499eb7
mov edx, dword [esi]
mov eax, 0x7fffffeb
sub eax, edx
cmp eax, ecx
jge 0x499eb2
mov eax, dword [esp + 0x78]
pop edi
pop esi
pop ebp
mov dword [eax], 0x14
xor eax, eax
pop ebx
add esp, 0x58
ret
lea eax, [edx + ecx]
mov dword [esi], eax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x58
ret