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

Disassembly:
sub esp, 0x7c
push ebx
push ebp
mov ebp, dword [esp + 0x88]
xor ebx, ebx
push esi
push edi
push 0x18
movsx eax, byte [ebp + 0x10]
lea esi, [ebp + 0x37e864]
add eax, 0xfffffff5
lea edi, [esp + 0x30]
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp eax, 0x12
ja case.0x406867.12
push 8
mov edi, 0x100
pop esi
jmp dword [eax*4 + 0x4071a4]
push ebp
push esi
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0xb
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x10], 0x17
jne 0x406898
mov byte [ebp + 0x10], 1
push 4
jmp 0x406aa9
cmp dword [esp + 0x10], 0x31
jne 0x406aa7
mov dword [ebp + 0x2c], ebx
push ebp
push esi
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0xd
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x10]
mov dword [ebp + 0x2c], eax
push ebp
push esi
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0xe
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x10]
mov dword [ebp + 0x2c], eax
push ebp
push esi
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0xf
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x10]
mov dword [ebp + 0x2c], eax
jl 0x406aa7
cmp eax, 0xdbbaa
jg 0x406aa7
mov esi, ebx
jmp 0x406957
mov esi, dword [esp + 0x2c]
push ebp
push 1
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0x10
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x10], 1
sete al
mov byte [esi + ebp + 0x36fbbc], al
inc esi
mov dword [esp + 0x2c], esi
cmp esi, 0x10
jl 0x40692e
push edi
lea eax, [ebp + 0x36fabc]
push ebx
push eax
call fcn.004073c8
add esp, 0xc
mov esi, ebx
jmp 0x4069b7
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
push ebp
push 1
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0x11
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x10], 1
jne 0x4069ac
mov eax, esi
shl eax, 4
add eax, edi
mov byte [eax + ebp + 0x36fabc], 1
inc edi
mov dword [esp + 0x30], edi
cmp edi, 0x10
jl 0x40697d
inc esi
mov dword [esp + 0x2c], esi
cmp esi, 0x10
jge 0x4069cd
cmp byte [esi + ebp + 0x36fbbc], bl
je 0x4069b6
mov edi, ebx
jmp 0x4069ad
mov dword [ebp + 0x36fab8], ebx
mov ecx, ebx
mov edi, 0x100
cmp byte [ecx + ebp + 0x36fabc], bl
je 0x4069f6
mov eax, dword [ebp + 0x36fab8]
mov byte [eax + ebp + 0x36fbcc], cl
inc dword [ebp + 0x36fab8]
inc ecx
cmp ecx, edi
jl 0x4069da
mov eax, dword [ebp + 0x36fab8]
test eax, eax
je 0x406aa7
add eax, 2
mov dword [esp + 0x38], eax
push ebp
push 3
lea eax, [esp + 0x44]
mov byte [ebp + 0x10], 0x12
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x3c], 2
jl 0x406aa7
cmp dword [esp + 0x3c], 6
jg 0x406aa7
push ebp
push 0xf
lea eax, [esp + 0x48]
mov byte [ebp + 0x10], 0x13
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov edx, dword [esp + 0x40]
cmp edx, 1
jl 0x406aa7
mov edi, dword [esp + 0x3c]
mov esi, ebx
jmp 0x406a90
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x2c]
push ebp
push 1
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0x14
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x10], ebx
jne 0x406a9e
mov edx, dword [esp + 0x40]
mov byte [esi + ebp + 0x37535e], al
inc esi
mov dword [esp + 0x2c], esi
cmp esi, edx
jge 0x406ac5
mov dword [esp + 0x30], ebx
jmp 0x406a65
inc eax
mov dword [esp + 0x30], eax
cmp eax, edi
jl 0x406a65
push 0xfffffffffffffffc
pop ebx
push 0x18
pop ecx
lea edi, [ebp + 0x37e864]
mov eax, ebx
lea esi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 4
mov al, bl
test edi, edi
jle 0x406ada
mov ecx, ebx
mov byte [esp + ecx + 0x24], al
inc al
movzx ecx, al
cmp ecx, edi
jl 0x406acd
mov ecx, ebx
mov dword [esp + 0x2c], ecx
test edx, edx
jle 0x406b2d
mov ebx, dword [esp + 0x40]
mov dl, byte [ecx + ebp + 0x37535e]
lea esi, [esp + 0x24]
movzx eax, dl
add esi, eax
mov ah, byte [esi]
test dl, dl
je 0x406b17
or ebp, 0xffffffff
mov al, byte [esi + ebp]
mov byte [esi], al
dec esi
sub dl, 1
jne 0x406b01
mov ebp, dword [esp + 0x90]
mov ebx, dword [esp + 0x40]
mov byte [ecx + ebp + 0x370d0c], ah
inc ecx
mov byte [esp + 0x24], ah
cmp ecx, ebx
jl 0x406ae8
mov dword [esp + 0x2c], ecx
xor ebx, ebx
mov ecx, dword [esp + 0x38]
mov esi, ebx
jmp 0x406bcc
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
jmp 0x406b88
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
push ebp
push 1
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0x17
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x10], 0
mov eax, dword [esp + 0x64]
jne 0x406b71
inc eax
jmp 0x406b72
dec eax
mov dword [esp + 0x64], eax
cmp eax, 1
jl 0x406aa7
cmp eax, 0x14
jg 0x406aa7
push ebp
push 1
lea eax, [esp + 0x18]
mov byte [ebp + 0x10], 0x16
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
cmp dword [esp + 0x10], eax
jne 0x406b4a
mov ecx, dword [esp + 0x64]
imul eax, esi, 0x102
add eax, edi
inc edi
mov byte [eax + ebp + 0x3799b0], cl
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x2c], edi
cmp edi, ecx
jl 0x406bf5
mov edi, dword [esp + 0x3c]
inc esi
mov dword [esp + 0x34], esi
cmp esi, edi
jge 0x406bfe
push ebp
push 5
lea eax, [esp + 0x6c]
mov byte [ebp + 0x10], 0x15
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov esi, dword [esp + 0x34]
mov edi, ebx
jmp 0x406bbb
mov eax, dword [esp + 0x64]
jmp 0x406b76
mov dword [esp + 0x34], ebx
test edi, edi
jle 0x406cc3
lea eax, [ebp + 0x37e84c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], eax
lea esi, [ebp + 0x37b7ec]
lea eax, [ebp + 0x3799b0]
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], eax
mov ebp, eax
mov dword [esp + 0x24], ebx
mov eax, ebx
mov dword [esp + 0x14], eax
push 0x20
pop edx
mov dword [esp + 0x18], edx
test ecx, ecx
jle 0x406c72
mov ebp, ebx
mov ebx, dword [esp + 0x10]
mov esi, ebp
movzx eax, byte [ebx + esi]
cmp eax, ebp
cmovg ebp, eax
cmp eax, edx
cmovl edx, eax
inc esi
cmp esi, ecx
jl 0x406c4b
mov esi, dword [esp + 0x20]
mov eax, ebp
mov dword [esp + 0x14], ebp
xor ebx, ebx
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x18], edx
push ecx
push eax
push edx
push ebp
lea eax, [esi + 0x1830]
push eax
push esi
lea eax, [esi - 0x1830]
push eax
call fcn.004072cf
mov ecx, dword [esp + 0x1c]
add ebp, 0x102
mov eax, dword [esp + 0x18]
add esi, 0x408
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], esi
mov dword [ecx], eax
add ecx, 4
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x38]
sub edi, 1
jne 0x406c2e
mov ebp, dword [esp + 0x90]
mov eax, dword [ebp + 0x36fab8]
lea edi, [ebp + 0x30]
inc eax
mov dword [esp + 0x54], 0xdbba0
mov dword [esp + 0x44], eax
lea esi, [ebp + 0x370d08]
or eax, 0xffffffff
mov dword [esp + 0x4c], ebx
mov edx, 0x100
mov dword [esp + 0x48], eax
mov ecx, edx
mov dword [esp + 0x2c], edx
xor eax, eax
mov edx, 0xfff
rep stosd dword es:[edi], eax
push 0xf
pop ecx
mov ah, cl
mov dword [esp + 0x14], 0xf
shl ah, 4
mov al, ah
add al, byte [esp + 0x14]
mov byte [edx + ebp + 0x36fccc], al
dec edx
sub dword [esp + 0x14], 1
jns 0x406d0e
lea eax, [edx + 1]
mov dword [esi], eax
sub esi, 4
sub ecx, 1
jns 0x406d01
push ebp
lea eax, [esp + 0x30]
mov dword [esp + 0x5c], ebx
push eax
call fcn.00407254
test eax, eax
jne 0x406aa7
push ebp
push dword [esp + 0x70]
lea eax, [esp + 0x78]
mov byte [ebp + 0x10], 0x18
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov edx, dword [esp + 0x70]
jmp 0x406d90
push ebp
push 1
lea eax, [esp + 0x7c]
mov byte [ebp + 0x10], 0x19
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [esp + 0x70]
lea edx, [eax + eax]
or edx, dword [esp + 0x74]
mov dword [esp + 0x70], edx
mov ecx, dword [esp + 0x6c]
cmp ecx, 0x14
jg 0x406aa7
mov eax, dword [esp + 0x80]
cmp edx, dword [eax + ecx*4]
jle 0x406db0
inc ecx
mov dword [esp + 0x6c], ecx
jmp case.0x406867.25
mov eax, dword [esp + 0x84]
sub edx, dword [eax + ecx*4]
js 0x406aa7
cmp edx, 0x102
jge 0x406aa7
mov eax, dword [esp + 0x88]
mov esi, dword [esp + 0x58]
mov edx, dword [eax + edx*4]
mov dword [esp + 0x50], edx
jmp 0x406eb8
push ebp
push 1
lea eax, [esp + 0x7c]
mov byte [ebp + 0x10], 0x1b
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [esp + 0x70]
lea edx, [eax + eax]
or edx, dword [esp + 0x74]
mov dword [esp + 0x70], edx
mov ecx, dword [esp + 0x6c]
cmp ecx, 0x14
jg 0x406aa7
mov eax, dword [esp + 0x80]
cmp edx, dword [eax + ecx*4]
jg 0x4070e6
mov eax, dword [esp + 0x84]
sub edx, dword [eax + ecx*4]
js 0x406aa7
cmp edx, 0x102
jge 0x406aa7
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x5c]
mov esi, dword [esp + 0x58]
mov edx, dword [eax + edx*4]
mov eax, dword [esp + 0x60]
mov dword [esp + 0x50], edx
test edx, edx
je 0x407098
cmp edx, 1
je 0x40709e
mov eax, dword [ebp + 0x370ccc]
inc ecx
mov dword [esp + 0x5c], ecx
movzx eax, byte [eax + ebp + 0x36fccc]
movzx edi, byte [eax + ebp + 0x36fbcc]
add dword [ebp + edi*4 + 0x30], ecx
test ecx, ecx
jle 0x406eb8
lea eax, [esi*4 + 0xc38]
add eax, ebp
cmp esi, dword [esp + 0x54]
jge 0x406aa7
inc esi
mov dword [eax], edi
add eax, 4
mov dword [esp + 0x58], esi
dec ecx
mov dword [esp + 0x5c], ecx
test ecx, ecx
jg 0x406e9b
cmp edx, dword [esp + 0x44]
je 0x4070f0
test edx, edx
je 0x407083
cmp edx, 1
je 0x407083
cmp esi, dword [esp + 0x54]
jge 0x406aa7
lea ecx, [edx - 1]
cmp ecx, 0x10
jae 0x406f24
mov edx, dword [ebp + 0x370ccc]
lea eax, [edx + ecx]
movzx eax, byte [eax + ebp + 0x36fccc]
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x406f18
lea edi, [edx + ebp]
mov al, byte [edi + ecx + 0x36fccb]
mov byte [edi + ecx + 0x36fccc], al
sub ecx, 1
jne 0x406f01
mov eax, dword [esp + 0x10]
mov byte [edx + ebp + 0x36fccc], al
jmp 0x406fe1
mov edi, ecx
and ecx, 0xf
shr edi, 4
lea edx, [edi*4 + 0x370ccc]
add edx, ebp
add ecx, dword [edx]
movzx eax, byte [ecx + ebp + 0x36fccc]
mov dword [esp + 0x10], eax
jmp 0x406f54
mov al, byte [ecx + ebp + 0x36fccb]
mov byte [ecx + ebp + 0x36fccc], al
dec ecx
cmp ecx, dword [edx]
jg 0x406f45
inc dword [edx]
test edi, edi
je 0x406f7b
dec dword [edx]
dec edi
mov eax, dword [edx - 4]
mov ecx, dword [edx]
lea edx, [edx - 4]
mov al, byte [eax + ebp + 0x36fcdb]
mov byte [ecx + ebp + 0x36fccc], al
test edi, edi
jg 0x406f5e
dec dword [ebp + 0x370ccc]
mov eax, dword [ebp + 0x370ccc]
mov ecx, dword [esp + 0x10]
mov byte [eax + ebp + 0x36fccc], cl
cmp dword [ebp + 0x370ccc], ebx
jne 0x406fdd
mov edx, 0xfff
mov dword [esp + 0x20], 0xf
lea ecx, [ebp + 0x370d08]
push 0xf
pop edi
mov eax, dword [ecx]
add eax, edi
mov al, byte [eax + ebp + 0x36fccc]
mov byte [edx + ebp + 0x36fccc], al
dec edx
sub edi, 1
jns 0x406fb0
lea eax, [edx + 1]
mov dword [ecx], eax
sub ecx, 4
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jns 0x406fad
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + ebp + 0x36fbcc]
push ebp
inc dword [ebp + eax*4 + 0x30]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax + ebp + 0x36fbcc]
mov dword [ebp + esi*4 + 0xc38], eax
lea eax, [esp + 0x30]
inc esi
push eax
mov dword [esp + 0x60], esi
call fcn.00407254
test eax, eax
jne 0x406aa7
push ebp
push dword [esp + 0x70]
lea eax, [esp + 0x78]
mov byte [ebp + 0x10], 0x1c
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
cmp ecx, 0x14
jg 0x406aa7
mov eax, dword [esp + 0x80]
cmp edx, dword [eax + ecx*4]
jle 0x406db0
inc ecx
mov dword [esp + 0x6c], ecx
push ebp
push 1
lea eax, [esp + 0x7c]
mov byte [ebp + 0x10], 0x1d
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov eax, dword [esp + 0x70]
lea edx, [eax + eax]
or edx, dword [esp + 0x74]
mov dword [esp + 0x70], edx
jmp 0x407037
or eax, 0xffffffff
mov ecx, eax
xor eax, eax
inc eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], eax
jmp 0x406e5e
add ecx, eax
mov dword [esp + 0x5c], ecx
add eax, eax
mov dword [esp + 0x60], eax
cmp edx, 1
jne 0x4070af
add ecx, eax
mov dword [esp + 0x5c], ecx
push ebp
lea eax, [esp + 0x30]
push eax
call fcn.00407254
test eax, eax
jne 0x406aa7
push ebp
push dword [esp + 0x70]
lea eax, [esp + 0x78]
mov byte [ebp + 0x10], 0x1a
push eax
call fcn.004071f0
test eax, eax
jne case.0x406867.12
mov edx, dword [esp + 0x70]
jmp 0x406e0b
inc ecx
mov dword [esp + 0x6c], ecx
jmp case.0x406867.27
cmp dword [ebp + 0x2c], 0
jl 0x406aa7
cmp dword [ebp + 0x2c], esi
jge 0x406aa7
mov dword [ebp + 0x14], ebx
lea ecx, [ebp + 0x30]
mov word [ebp + 0x10], 2
mov dword [ebp + 0x430], ebx
mov ebp, 0x100
mov eax, dword [ecx + 0x400]
add eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [ecx + 0x400], eax
sub ebp, 1
jne 0x40711a
mov ebp, dword [esp + 0x90]
mov edi, ebx
mov dword [esp + 0x2c], edi
test esi, esi
jle 0x407172
lea ebx, [ebp + 0xc38]
movzx edx, byte [ebx]
mov eax, edi
shl eax, 8
lea ebx, [ebx + 4]
mov ecx, dword [ebp + edx*4 + 0x430]
or dword [ebp + ecx*4 + 0xc38], eax
inc dword [ebp + edx*4 + 0x430]
inc edi
cmp edi, esi
jl 0x407147
mov dword [esp + 0x2c], edi
xor ebx, ebx
mov eax, dword [ebp + 0x2c]
mov eax, dword [ebp + eax*4 + 0xc38]
shr eax, 8
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x18], ebx
mov ecx, dword [ebp + eax*4 + 0xc38]
movzx eax, cl
shr ecx, 8
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], ecx
mov dword [ebp + 0x18], 1
jmp case.0x406867.12