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

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x38]
push ebx
push esi
push edi
mov ecx, dword [eax + 0x450]
mov edx, dword [eax + 0x454]
mov edi, dword [esp + 0x40]
mov eax, dword [eax + 0x460]
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x38], eax
call fcn.004b04d0
add esp, 4
test ax, ax
jne 0x4ad92c
mov ecx, dword [0x50e918]
test edi, edi
mov esi, dword [ecx]
je 0x4ad492
mov eax, dword [edi]
test eax, eax
je 0x4ad492
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4ad492
movsx edx, word [eax + 0x14]
mov dword [0x50e8fc], ecx
mov eax, dword [edi]
mov dword [esp + 0x10], edx
mov ecx, dword [eax + 0x10]
mov ebx, dword [ecx]
mov dword [esp + 0x14], ebx
jmp 0x4ad4aa
mov eax, dword [0x50ed44]
mov dword [esp + 0x10], 0x200
mov dword [0x50e8fc], eax
mov ebx, dword [eax]
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x10]
mov dl, byte [ebx]
test edi, edi
mov cl, byte [ebx + eax - 1]
mov byte [esp + 0x40], dl
mov byte [esp + 0xf], cl
je 0x4ad4d0
mov edi, dword [edi]
test edi, edi
je 0x4ad4d8
movsx edx, word [edi + 0xa]
mov dword [esp + 0x1c], edx
jmp 0x4ad4d8
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x80]
mov eax, edx
dec edx
test eax, eax
je 0x4ad92c
movsx ecx, word [esp + 0x7c]
movsx eax, word [esp + 0x54]
imul eax, ecx
mov edi, dword [esp + 0x60]
inc edx
push ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x4ad69f
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4ad69f
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x4c]
xor ecx, ecx
mov cl, byte [edx]
xor edx, edx
mov dl, byte [eax]
mov cx, word [esi + ecx*2 + 2]
add cx, word [esi + edx*2 + 0x202]
xor edx, edx
mov word [esi], cx
mov ecx, dword [esp + 0x50]
mov dl, byte [ecx]
xor ecx, ecx
mov cl, byte [eax]
mov ax, word [esi + ecx*2 + 0x804]
xor ecx, ecx
sub ax, word [esi + edx*2 + 0x404]
mov edx, dword [esp + 0x54]
mov cl, byte [edx]
xor edx, edx
sub ax, word [esi + ecx*2 + 0x604]
mov ecx, dword [esp + 0x50]
mov word [esi + 0x402], ax
xor eax, eax
mov al, byte [ecx]
mov ecx, dword [esp + 0x4c]
mov dl, byte [ecx]
mov ax, word [esi + eax*2 + 0xa06]
mov ecx, dword [esp + 0x20]
add ax, word [esi + edx*2 + 0xc06]
test ecx, ecx
mov word [esi + 0xa04], ax
je 0x4ad638
movsx ecx, word [esi]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
cmp ecx, edx
jge 0x4ad622
movsx ecx, word [esi + 0x402]
cmp ecx, edx
jge 0x4ad622
movsx edx, ax
cmp edx, dword [esp + 0x14]
mov dword [esp + 0x34], edx
jge 0x4ad622
cmp word [esi], 0
jl 0x4ad60b
cmp word [esi + 0x402], 0
jl 0x4ad60b
test ax, ax
jl 0x4ad60b
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov cl, byte [ecx + ebx]
mov dl, byte [edx + ebx]
mov al, byte [eax + ebx]
mov byte [esp + 0x64], dl
mov byte [esp + 0x84], cl
jmp 0x4ad6bc
or dl, 0xff
xor cl, cl
mov byte [esp + 0x64], dl
mov byte [esp + 0x84], cl
xor al, al
jmp 0x4ad6bc
xor dl, dl
xor cl, cl
mov byte [esp + 0x64], dl
mov byte [esp + 0x84], cl
or al, 0xff
jmp 0x4ad6bc
mov cx, word [esi]
test ch, 0xfe
jne 0x4ad648
movsx ecx, cx
mov dl, byte [ecx + ebx]
jmp 0x4ad655
mov dl, byte [esp + 0x44]
test cx, cx
jl 0x4ad655
mov dl, byte [esp + 0x13]
mov cx, word [esi + 0x402]
mov byte [esp + 0x64], dl
test ch, 0xfe
jne 0x4ad66d
movsx ecx, cx
mov cl, byte [ecx + ebx]
jmp 0x4ad67a
test cx, cx
mov cl, byte [esp + 0x44]
jl 0x4ad67a
mov cl, byte [esp + 0x13]
test ah, 0xfe
mov byte [esp + 0x84], cl
jne 0x4ad68e
movsx eax, ax
mov al, byte [eax + ebx]
jmp 0x4ad6bc
test ax, ax
jge 0x4ad699
mov al, byte [esp + 0x44]
jmp 0x4ad6bc
mov al, byte [esp + 0x13]
jmp 0x4ad6bc
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
mov dl, byte [ecx]
mov cl, byte [eax]
mov eax, dword [esp + 0x54]
mov byte [esp + 0x64], dl
mov byte [esp + 0x84], cl
mov al, byte [eax]
cmp dword [esp + 0x24], 0
mov byte [esp + 0x58], al
je 0x4ad7ba
mov ebx, dword [esp + 0x68]
and ebx, 0xffff
movzx dx, dl
lea ebp, [edi + ebx*2]
movzx cx, cl
mov bx, word [ebp]
sar bx, 1
add ebx, edx
mov edx, dword [esp + 0x6c]
and edx, 0xffff
mov word [esi], bx
xor ebx, ebx
lea edx, [edi + edx*2]
mov word [ebp], bx
movzx ax, al
mov bp, word [edx]
sar bp, 1
add ebp, ecx
mov word [esi + 0x402], bp
mov word [edx], bx
mov edx, dword [esp + 0x70]
and edx, 0xffff
lea ecx, [edi + edx*2]
mov dx, word [edi + edx*2]
sar dx, 1
add edx, eax
mov word [esi + 0xa04], dx
mov word [ecx], bx
mov ax, word [esi]
cmp ax, bx
jge 0x4ad742
mov word [esi], bx
jmp 0x4ad74d
cmp ax, 0xff
jle 0x4ad74d
mov word [esi], 0xff
mov ax, word [esi + 0x402]
cmp ax, bx
jge 0x4ad762
mov word [esi + 0x402], bx
jmp 0x4ad771
cmp ax, 0xff
jle 0x4ad771
mov word [esi + 0x402], 0xff
mov ax, word [esi + 0xa04]
cmp ax, bx
jge 0x4ad786
mov word [esi + 0xa04], bx
jmp 0x4ad795
cmp ax, 0xff
jle 0x4ad795
mov word [esi + 0xa04], 0xff
mov dl, byte [esi]
mov cl, byte [esi + 0x402]
mov al, byte [esi + 0xa04]
mov ebp, dword [esp + 0x5c]
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x64], dl
mov byte [esp + 0x84], cl
mov byte [esp + 0x58], al
cmp dword [esp + 0x38], 0
je 0x4ad7d3
shr al, 3
and cl, 0xe7
and dl, 0xe0
or al, cl
shr al, 3
or al, dl
jmp 0x4ad7f2
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
push eax
push ecx
call fcn.004ad2e0
add esp, 0x10
mov byte [ebp], al
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4ad8f0
mov eax, dword [esp + 0x48]
xor edx, edx
mov dl, byte [ebp]
mov ebp, dword [esp + 0x1c]
movzx cx, byte [eax + edx*4 + 4]
movzx bx, byte [eax + edx*4 + 3]
lea edx, [eax + edx*4 + 2]
mov ax, word [esi]
sub ax, cx
mov cx, word [esi + 0x402]
sub cx, bx
movzx bx, byte [edx]
mov dx, word [esi + 0xa04]
sub dx, bx
mov ebx, dword [esp + 0x68]
and ebx, 0xffff
add ebx, ebp
add word [edi + ebx*2], ax
lea ebx, [edi + ebx*2]
mov ebx, dword [esp + 0x74]
mov ebp, ebx
and ebp, 0xffff
add word [edi + ebp*2], ax
mov eax, dword [esp + 0x6c]
lea ebp, [edi + ebp*2]
and eax, 0xffff
mov ebp, dword [esp + 0x1c]
add eax, ebp
mov ebp, dword [esp + 0x78]
add word [edi + eax*2], cx
lea eax, [edi + eax*2]
mov eax, ebp
and eax, 0xffff
add word [edi + eax*2], cx
mov ecx, dword [esp + 0x70]
lea eax, [edi + eax*2]
and ecx, 0xffff
add ecx, dword [esp + 0x1c]
add word [edi + ecx*2], dx
lea eax, [edi + ecx*2]
mov ecx, dword [esp + 0x7c]
mov eax, ecx
and eax, 0xffff
add word [edi + eax*2], dx
mov edx, dword [esp + 0x68]
lea eax, [edi + eax*2]
mov eax, dword [esp + 0x80]
add edx, eax
add ebx, eax
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x6c]
add edx, eax
add ebp, eax
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x70]
add edx, eax
add ecx, eax
mov dword [esp + 0x74], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x78], ebp
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0x70], edx
mov dword [esp + 0x7c], ecx
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x60]
add ecx, eax
add ebp, edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x54]
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x5c], ebp
dec eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x28], eax
jne 0x4ad50d
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x30
ret