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

Disassembly:
sub esp, 0xdc
mov eax, dword [0x4e8014]
xor eax, esp
mov dword [esp + 0xd4], eax
push ebx
mov ebx, dword [esp + 0xe4]
push ebp
mov ebp, ecx
mov dword [esp + 0x24], edx
push esi
xor ecx, ecx
mov dword [esp + 0x3c], ebp
push edi
mov eax, dword [ebp]
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], 0
mov eax, dword [eax]
mov dword [esp + 0x54], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x6c], esi
mov edx, dword [eax]
xor eax, eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
cmp byte [edx + 0x57], al
je 0x496da4
lea eax, [ecx + 7]
jmp 0x497639
mov eax, dword [esi + 0x2c]
mov edx, 0x18
movzx ecx, word [esi + 0x18]
test al, 0x20
mov dword [esp + 0x50], eax
mov eax, 0x1bf
cmove edx, eax
mov dword [esp + 0x4c], ecx
movzx eax, word [esi + 0x1a]
mov dword [esp + 0x60], eax
movzx eax, word [esi + 0x1c]
mov dword [esp + 0x64], eax
movzx eax, word [esi + 0x32]
mov dword [esp + 0x68], eax
movzx eax, word [esi + 0x30]
mov dword [esp + 0x44], eax
mov eax, dword [esi]
mov dword [esp + 0x58], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x5c], eax
movzx eax, word [esi + 0x16]
mov edi, eax
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x78], edi
movzx edi, cx
mov ecx, edx
and ecx, 0xffffffc3
mov dword [esp + 0x18], edi
test al, 4
push ebx
cmove ecx, edx
mov edx, dword [esp + 0x30]
push ecx
push edi
lea ecx, [esp + 0x8c]
push dword [edx + 0x2c]
mov edx, dword [ebp + 4]
call fcn.00494250
mov ebp, eax
add esp, 0x10
xor eax, eax
mov word [esi + 0x12], ax
mov eax, dword [ebx + 8]
movzx eax, word [eax]
mov ecx, eax
mov dword [esp + 0x74], ecx
cmp cx, 0xa
jg 0x496e4b
xor eax, eax
jmp 0x496e5e
cwde
cdq
push edx
push eax
call fcn.00409280
add esp, 8
sub ax, 0x21
movzx eax, ax
mov dword [esp + 0x28], eax
mov ecx, 0x100
movzx eax, ax
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x30], eax
nop dword [eax]
test ebp, ebp
je 0x49750e
movzx edx, word [ebp + 0xc]
mov eax, edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x34], eax
cmp ax, cx
je 0x496ea5
test byte [ebp + 0xa], 0x80
je 0x496ed1
mov eax, dword [ebx + 4]
movsx ecx, word [eax + edi*2]
test ecx, ecx
js 0x496ec8
mov eax, dword [ebx + 0xc]
add ecx, ecx
mov eax, dword [eax + 4]
test dword [eax + ecx*8 + 4], 0xf
jne 0x4974f0
jmp 0x496ed1
cmp ecx, 0xffffffff
je 0x4974f0
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
and ecx, dword [ebp + 0x20]
and eax, dword [ebp + 0x24]
or ecx, eax
jne 0x4974f0
mov eax, 0x100
test word [ebp + 0xa], ax
je 0x496ef9
cmp edx, 0x10
je 0x4974f0
mov ecx, dword [esp + 0x2c]
test byte [ecx + 0x24], 0x58
je 0x496f1c
mov eax, dword [ebp]
test byte [eax + 4], 3
je 0x4974f0
mov eax, dword [eax + 0x24]
cmp eax, dword [ecx + 0x2c]
jne 0x4974f0
cmp byte [ebx + 0x36], 0
je 0x496f35
movzx eax, word [ebx + 0x32]
dec eax
cmp edi, eax
jne 0x496f35
mov edi, dword [esp + 0x40]
or byte [edi + 0x10], 2
jmp 0x496f3d
mov eax, dword [esp + 0x40]
or byte [eax + 0x10], 1
mov eax, dword [esp + 0x50]
mov edx, esi
mov ecx, dword [esp + 0x44]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x4c]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x60]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x64]
mov word [esi + 0x1c], ax
movzx eax, cx
inc eax
mov word [esi + 0x30], cx
mov ecx, dword [esp + 0x3c]
push eax
call fcn.004961f0
add esp, 4
test eax, eax
jne 0x49750e
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edi, dword [esp + 0x58]
mov dword [eax + ecx*4], ebp
mov ax, word [esi + 0x30]
mov ecx, dword [esi + 8]
inc ax
mov word [esi + 0x30], ax
not ecx
or edi, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
and edi, ecx
or edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x34]
movzx ebx, ax
mov eax, dword [esi + 0xc]
not eax
mov dword [esi], edi
and edx, eax
mov dword [esi + 4], edx
test cl, 1
je 0x4970f5
mov edx, dword [ebp]
test dword [edx + 4], 0x1000
je 0x497049
lea edi, [ebx - 1]
mov dword [esp + 0x1c], 0x2e
xor ecx, ecx
test edi, edi
jle 0x49706a
mov ebx, dword [esi + 0x38]
mov esi, dword [esp + 0x1c]
nop dword [eax]
mov eax, dword [ebx + ecx*4]
test eax, eax
je 0x497006
cmp dword [eax], edx
mov dword [esp + 0x1c], 0
cmove esi, dword [esp + 0x1c]
inc ecx
cmp ecx, edi
jl 0x496ff0
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x6c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
test byte [eax + 0x38], 0x80
je 0x4970ba
cmp word [esp + 0x28], 0xa
jl 0x4970ba
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x18]
movzx edi, cx
movzx ebx, word [eax + edx*2]
cmp di, 0xa
jg 0x497071
xor eax, eax
jmp 0x497086
mov eax, dword [edx + 0x14]
test eax, eax
je 0x497013
mov eax, dword [eax]
test eax, eax
je 0x497013
cdq
push edx
push eax
call fcn.00409280
movsx ecx, ax
add esp, 8
mov dword [esp + 0x1c], ecx
jmp 0x497017
mov ecx, 0x2e
jmp 0x497017
movsx eax, di
cdq
push edx
push eax
call fcn.00409280
add esp, 8
sub ax, 0x21
movzx eax, ax
sub eax, edi
sub eax, dword [esp + 0x28]
add eax, 0xa
add eax, ebx
test ax, ax
jns 0x4970ba
cmp word [esp + 0x30], 2
jge 0x4974e8
mov eax, dword [esp + 0x3c]
test dword [eax + 0x50], 0x20000
jne 0x4974e8
or dword [esi + 0x2c], 0x100000
or dword [esi + 0x2c], 4
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov ebx, dword [esi + 0x2c]
test bl, 2
je 0x4972f6
movzx eax, word [esi + 0x16]
movsx edi, ax
test edx, edx
je 0x497277
movzx ecx, word [edx + 8]
test cx, cx
jg 0x49726e
add eax, ecx
jmp 0x497277
test cl, 0x82
je 0x497182
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x2c]
or edx, 1
mov eax, dword [ebx + 4]
movsx eax, word [eax + ecx*2]
mov dword [esi + 0x2c], edx
cmp eax, 0xffffffff
je 0x497159
mov ecx, edx
test eax, eax
js 0x497164
cmp word [esp + 0x30], 0
jne 0x497164
movzx eax, word [ebx + 0x32]
mov edi, eax
dec eax
cmp dword [esp + 0x18], eax
jne 0x497164
test byte [ebx + 0x38], 8
jne 0x497159
cmp edi, 1
jne 0x49714f
cmp byte [ebx + 0x36], 0
je 0x49714f
cmp word [esp + 0x34], 2
je 0x497159
mov ecx, edx
or ecx, 0x10000
jmp 0x497161
mov ecx, edx
or ecx, 0x1000
mov dword [esi + 0x2c], ecx
cmp byte [esp + 0x99], 1
mov edi, ebx
jbe 0x4970c2
or ecx, 0x200000
mov dword [esi + 0x2c], ecx
jmp 0x4970c2
mov eax, dword [esi + 0x2c]
test ecx, 0x100
je 0x497198
or eax, 8
mov dword [esi + 0x2c], eax
jmp 0x4970be
mov edx, dword [esp + 0x2c]
test cl, 0x24
mov ecx, dword [esp + 0x54]
push ebp
push dword [esp + 0x1c]
je 0x497224
mov ebx, dword [esp + 0x1c]
or eax, 0x22
mov dword [esi + 0x2c], eax
mov edx, dword [edx + 0x2c]
push ebx
call fcn.00496b30
mov word [esi + 0x1a], ax
add esp, 0xc
xor eax, eax
mov edx, ebp
mov dword [esp + 0x38], eax
mov eax, 0x100
mov dword [esp + 0x20], edx
test word [ebp + 0xa], ax
je 0x497267
movzx eax, word [esi + 0x30]
lea edi, [ebp + 0x30]
mov ecx, dword [esp + 0x3c]
inc eax
push eax
mov edx, esi
mov dword [esp + 0x3c], edi
call fcn.004961f0
add esp, 4
test eax, eax
jne 0x49750e
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov dword [eax + ecx*4], edi
mov eax, 1
inc word [esi + 0x30]
mov edi, ebx
or dword [esi + 0x2c], 0x10
mov word [esi + 0x1c], ax
jmp 0x4970c2
mov edi, dword [esp + 0x1c]
or eax, 0x12
mov dword [esi + 0x2c], eax
mov edx, dword [edx + 0x2c]
push edi
call fcn.00496b30
add esp, 0xc
mov word [esi + 0x1c], ax
test byte [esi + 0x2c], 0x20
mov dword [esp + 0x38], ebp
je 0x49725c
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edx, dword [eax + ecx*4 - 8]
mov dword [esp + 0x20], edx
jmp 0x4970c6
xor edx, edx
mov dword [esp + 0x20], edx
jmp 0x4970c6
mov edi, ebx
jmp 0x4970c6
test byte [edx + 0xa], 0x80
jne 0x497277
sub eax, 0x14
mov ebp, dword [esp + 0x38]
movzx ecx, ax
test ebp, ebp
je 0x49729b
movzx edx, word [ebp + 8]
test dx, dx
jg 0x49728f
add eax, edx
jmp 0x497298
test byte [ebp + 0xa], 0x80
jne 0x49729b
add eax, 0xffffffec
movzx ecx, ax
mov eax, dword [esp + 0x20]
movzx edx, cx
test eax, eax
je 0x4972be
cmp word [eax + 8], 0
jle 0x4972be
test ebp, ebp
je 0x4972be
cmp word [ebp + 8], 0
jle 0x4972be
lea eax, [ecx - 0x14]
movzx edx, ax
xor eax, eax
cmp dword [esp + 0x20], eax
setne al
sub edi, eax
xor eax, eax
test ebp, ebp
setne al
sub edi, eax
cmp dx, 0xa
mov eax, 0xa
cmovl edx, eax
movzx eax, dx
cmp eax, edi
mov edx, eax
movzx eax, di
mov edi, dword [esp + 0x14]
cmovge edx, eax
movzx eax, dx
mov ebp, eax
jmp 0x49734f
inc word [esi + 0x18]
movzx ecx, word [ebp + 8]
movzx edx, word [esi + 0x18]
test cx, cx
jg 0x497324
mov eax, dword [edi + 4]
mov ebp, dword [esp + 0x18]
cmp word [eax + ebp*2], 0
jl 0x497324
sub ecx, dword [esp + 0x1c]
add cx, word [esi + 0x16]
movzx eax, cx
mov ebp, eax
jmp 0x49734f
mov eax, dword [edi + 8]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 - 2]
add cx, word [esi + 0x16]
test dword [esp + 0x34], 0x100
movzx eax, cx
mov ecx, eax
mov word [esi + 0x16], ax
mov ebp, eax
je 0x497353
lea eax, [ecx + 0xa]
movzx ebp, ax
mov word [esi + 0x16], ax
movzx eax, bp
mov dword [esp + 0x34], eax
movsx eax, word [edi + 0x30]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x10]
movsx ecx, word [eax + 0x28]
mov eax, edx
cdq
idiv ecx
lea ecx, [eax + ebp]
lea eax, [ecx + 1]
movsx ecx, cx
movzx edi, ax
inc ecx
mov eax, dword [esp + 0x70]
movsx edx, ax
cmp word [esp + 0x28], di
jl 0x4973bb
lea eax, [ecx + 0x31]
cmp edx, eax
jle 0x49739d
mov eax, dword [esp + 0x28]
jmp 0x4973de
lea eax, [ecx + 0x1f]
cmp edx, eax
jle 0x4973ab
mov eax, dword [esp + 0x28]
inc eax
jmp 0x4973de
sub edx, ecx
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, word [esp + 0x28]
jmp 0x4973de
lea eax, [edx + 0x31]
cmp ecx, eax
jle 0x4973c6
mov ecx, edi
jmp 0x4973e1
lea eax, [edx + 0x1f]
cmp ecx, eax
jle 0x4973d2
lea eax, [edi + 1]
jmp 0x4973de
sub ecx, edx
movzx eax, byte [ecx + str._n_n_t_t_b_b_a_a_a]
add ax, di
movzx ecx, ax
movzx eax, cx
test ebx, 0x140
jne 0x49744f
lea eax, [ebp + 0x10]
movsx edi, bp
movzx ebx, ax
add edi, 0x10
movsx edx, cx
cmp cx, bx
jl 0x497426
lea eax, [edi + 0x31]
cmp edx, eax
jle 0x49740c
movzx eax, cx
jmp 0x49744c
lea eax, [edi + 0x1f]
cmp edx, eax
jle 0x497418
lea eax, [ecx + 1]
jmp 0x497449
sub edx, edi
movzx eax, byte [edx + str._n_n_t_t_b_b_a_a_a]
add ax, cx
jmp 0x497449
lea eax, [edx + 0x31]
cmp edi, eax
jle 0x497431
mov eax, ebx
jmp 0x49744c
lea eax, [edx + 0x1f]
cmp edi, eax
jle 0x49743d
lea eax, [ebx + 1]
jmp 0x497449
sub edi, edx
movzx eax, byte [edi + str._n_n_t_t_b_b_a_a_a]
add ax, bx
movzx eax, ax
movzx eax, ax
mov ecx, dword [esp + 0x1c]
mov edx, esi
push dword [esp + 0x74]
movzx edi, cx
add eax, edi
add eax, dword [esp + 0x34]
mov word [esi + 0x14], ax
lea eax, [edi + ebp]
mov ebp, dword [esp + 0x44]
add eax, dword [esp + 0x34]
mov word [esi + 0x16], ax
mov ecx, dword [ebp + 4]
call fcn.00496950
add esp, 4
mov edx, esi
mov ecx, ebp
call fcn.00496670
mov ecx, dword [esp + 0x78]
mov ebx, dword [esp + 0x14]
movzx edx, cx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x2c]
test al, 2
movzx ecx, cx
cmove edx, ecx
mov word [esi + 0x16], dx
test al, 0x10
jne 0x4974de
movzx eax, word [esi + 0x18]
cmp ax, word [ebx + 0x34]
jae 0x4974de
cmp ax, word [ebx + 0x32]
jb 0x4974c8
mov eax, dword [ebx + 0x38]
and al, 3
cmp al, 2
je 0x4974de
mov eax, dword [esp + 0x30]
mov ecx, ebp
mov edx, dword [esp + 0x2c]
add eax, edi
push eax
push ebx
call fcn.00496d40
add esp, 8
mov eax, dword [esp + 0x48]
mov word [esi + 0x16], ax
jmp 0x4974ec
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x80]
call fcn.00493ed0
cmp dword [esp + 0x24], 0
mov ebp, eax
mov ecx, 0x100
je 0x496e80
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x68]
mov dword [esi], eax
mov eax, dword [esp + 0x5c]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x60]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x64]
mov word [esi + 0x1c], ax
mov eax, dword [esp + 0x50]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x48]
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x44]
mov word [esi + 0x18], dx
mov word [esi + 0x32], cx
mov word [esi + 0x30], ax
cmp dx, cx
jne 0x497633
mov edi, dword [esp + 0x18]
movzx ecx, word [ebx + 0x32]
lea eax, [edi + 1]
cmp eax, ecx
jae 0x497633
mov eax, dword [esp + 0x44]
movzx ebp, ax
cmp dx, bp
jne 0x497633
mov eax, dword [ebx + 0x38]
test al, 0x40
jne 0x497633
test al, al
jns 0x497633
mov ecx, dword [esp + 0x3c]
test dword [ecx + 0x50], 0x4000
jne 0x497633
mov eax, dword [ebx + 8]
cmp word [eax + edi*2 + 2], 0x2a
jl 0x497633
inc ebp
mov edx, esi
push ebp
call fcn.004961f0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x497637
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
inc word [esi + 0x18]
inc word [esi + 0x32]
mov edx, dword [esp + 0x30]
mov dword [eax + ecx*4], ebp
add edx, 5
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x8000
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x18]
mov di, word [eax + edi*2]
sub di, word [eax + ecx*2 + 2]
mov ecx, dword [esp + 0x40]
movzx eax, di
sub word [esi + 0x16], ax
add eax, edx
mov edx, dword [esp + 0x2c]
push eax
push ebx
call fcn.00496d40
mov eax, dword [esp + 0x50]
add esp, 8
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x4c]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x68]
mov word [esi + 0x32], ax
mov eax, dword [esp + 0x50]
mov dword [esi + 0x2c], eax
jmp 0x497637
mov ebp, dword [esp + 0x24]
mov eax, ebp
mov ecx, dword [esp + 0xe4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004bab62
add esp, 0xdc
ret