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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov esi, dword [esp + 0x1c]
test byte [esi + 0xa], 8
jne 0x40814a
xor edx, edx
cmp dword [esi], 0
jne 0x408174
jmp 0x40815b
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
setbe dl
cmp dword [esi], 0
jne 0x408174
mov eax, dword [esi + 0x7c]
mov ebp, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ebp
cmp eax, 0x14ccc
jb 0x408174
add ebp, dword [esi + 0x74]
jmp 0x40817a
lea ebp, [esi + 0x39272]
mov dword [esi + 0x30], ebp
lea eax, [ebp + 0x14cbc]
mov dword [esi + 0x34], eax
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov eax, dword [esi + 0x2c]
movzx ebx, byte [eax]
movzx ecx, byte [esi + 0x38]
shr ebx, cl
mov edi, dword [esp + 0x20]
mov byte [eax], bl
mov ecx, dword [esi + 8]
xor eax, eax
cmp dword [esi + 0x38], 8
sete al
sub dword [esi + 0x28], eax
test ecx, 0x1000
je 0x4081c7
cmp dword [esi + 0x64], 0
je 0x4082d9
xor ebx, ebx
cmp edi, 4
sete bl
mov ecx, dword [esi + 0x44]
shl ebx, cl
or ebx, dword [esi + 0x48]
mov dword [esi + 0x48], ebx
inc ecx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x408295
mov edi, dword [esi + 0x30]
xor eax, eax
test dl, dl
jne 0x40824a
mov dword [esp], ecx
mov al, 1
test byte [esi + 0xa], 4
jne 0x408202
cmp dword [esi + 0x3c], 0x30
setb al
movzx edx, al
mov ecx, esi
call fcn.0040afc0
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x408309
mov edx, dword [esi + 0x30]
mov dword [esp + 4], ebp
mov ebp, edi
not ebp
and ebp, edx
xor edx, edi
add ebp, ebp
sub ebp, edx
mov edx, ebp
and edx, 1
xor ebp, 1
lea edx, [edx*2]
add edx, ebp
mov ebp, dword [esp + 4]
cmp edx, ecx
mov ecx, dword [esp]
jb 0x40830c
mov edx, ecx
mov ecx, dword [esi + 0x1c]
sub ecx, dword [esi + 0x40]
cmp ecx, dword [esi + 0x24]
mov ecx, edx
ja 0x40830c
mov dword [esi + 0x30], edi
mov dword [esi + 0x48], ebx
lea eax, [ecx + 2]
mov dword [esi + 0x44], eax
cmp ecx, 6
jae 0x4082c1
jmp 0x408332
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4081e7
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x408280
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x408280
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40832e
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x4082b0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x4082b0
and ecx, 0xfff
mov edi, ebp
cmp ecx, 0x7f
jg 0x408369
cmp ecx, 0x20
ja case.0x4082f8.2
mov eax, 0x7800
jmp dword [ecx*4 + 0x44668c]
mov eax, 0x7840
jmp case.0x4082f8.0
mov ecx, dword [esp]
test eax, eax
jne 0x408499
mov dword [esi + 0x30], edi
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
mov ecx, esi
mov edx, 1
call fcn.0040afc0
jmp 0x408499
test eax, eax
je 0x408391
mov dword [esi + 0x44], 8
mov ecx, 8
jmp 0x408351
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x408393
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x408340
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x408340
cmp ecx, 0x1ff
jg 0x40881d
cmp ecx, 0x80
je 0x408832
cmp ecx, 0x100
mov eax, 0x78c0
jmp case.0x4082f8.0
xor ecx, ecx
movzx eax, word [esi + 0x3c]
shl eax, cl
or eax, ebx
mov dword [esi + 0x48], eax
or ecx, 0x10
mov dword [esi + 0x44], ecx
jmp 0x4083ca
shr eax, 8
mov dword [esi + 0x48], eax
mov edx, ecx
xor edx, 8
and ecx, 0xfffffff7
add ecx, ecx
sub ecx, edx
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4083e2
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x4083b0
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x4083b0
mov edx, 0xffff
xor edx, dword [esi + 0x3c]
mov dword [esi + 0x3c], edx
movzx edx, dx
shl edx, cl
or eax, edx
mov dword [esi + 0x48], eax
or ecx, 0x10
mov dword [esi + 0x44], ecx
jmp 0x40841a
shr eax, 8
mov dword [esi + 0x48], eax
mov edx, ecx
xor edx, 8
and ecx, 0xfffffff7
add ecx, ecx
sub ecx, edx
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x408432
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x408400
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x408400
xor dword [esi + 0x3c], 0xffff
je 0x408499
xor edx, edx
jmp 0x408446
inc edx
cmp edx, dword [esi + 0x3c]
jae 0x408499
mov edi, dword [esi + 0x40]
add edi, edx
and edi, 0x7fff
movzx edi, byte [esi + edi + 0x90]
shl edi, cl
or eax, edi
mov dword [esi + 0x48], eax
add ecx, 8
mov dword [esi + 0x44], ecx
jmp 0x408481
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x408440
mov ebx, dword [esi + 0x30]
cmp ebx, dword [esi + 0x34]
jae 0x408470
lea ecx, [ebx + 1]
mov dword [esi + 0x30], ecx
mov byte [ebx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x408470
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x40859f
mov eax, dword [esi + 0x44]
cmp ecx, 4
jne 0x4084fd
test eax, eax
je 0x408593
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x48]
mov ecx, 8
jmp 0x4084e5
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x408595
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x4084d0
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x4084d0
add eax, 3
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x408539
mov ecx, dword [esi + 0x48]
jmp 0x408521
shr ecx, 8
mov dword [esi + 0x48], ecx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x408539
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x408510
lea eax, [edx + 1]
mov dword [esi + 0x30], eax
mov byte [edx], cl
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
jmp 0x408510
test eax, eax
je 0x40875d
mov dword [esi + 0x44], 8
mov eax, dword [esi + 0x48]
mov edx, 8
jmp 0x40857f
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
shr eax, 8
mov dword [esi + 0x48], eax
lea edx, [ecx - 8]
mov dword [esi + 0x44], edx
cmp edx, 7
jbe 0x40858b
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jb 0x408560
mov ecx, edx
jmp 0x40856e
add ecx, 8
jmp 0x408765
xor ecx, ecx
test byte [esi + 9], 0x10
jne 0x40864a
lea eax, [esi + 0x8192]
lea edi, [esi + 0x9272]
lea ebx, [esi + 0x9273]
push 0x280
push 0
push eax
call fcn.0040ce20
add esp, 0xc
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], edi
mov dword [esi + 0x38], 8
mov ebx, dword [esi + 0x30]
mov eax, dword [esi + 0x3c]
add dword [esi + 0x40], eax
mov dword [esi + 0x3c], 0
inc dword [esi + 0x64]
sub ebx, ebp
je 0x408812
cmp dword [esi], 0
je 0x408631
mov eax, dword [esi + 0x84]
mov ecx, eax
not ecx
mov edx, dword [esi + 0x70]
mov edi, dword [esi + 0x78]
and ecx, edx
not edx
and edx, eax
sub edx, ecx
mov dword [edi], edx
lea eax, [esi + 0x39272]
push dword [esi + 4]
push ebx
push eax
call dword [esi]
add esp, 0xc
test eax, eax
jne 0x408812
mov dword [esi + 0x6c], 0xffffffff
mov eax, 0xffffffff
jmp 0x408815
lea eax, [esi + 0x39272]
cmp ebp, eax
je 0x4087dd
add dword [esi + 0x8c], ebx
jmp 0x408812
mov ebx, dword [esi + 0x18]
mov dword [esp], ebx
shr ebx, 0x18
shl ebx, cl
or ebx, dword [esi + 0x48]
mov dword [esi + 0x48], ebx
or ecx, 8
mov dword [esi + 0x44], ecx
jmp 0x40868f
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
shr ebx, 8
mov dword [esi + 0x48], ebx
lea ecx, [eax - 8]
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40869b
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jb 0x408670
mov eax, ecx
jmp 0x40867e
mov edx, dword [esp]
shr edx, 0x10
movzx edx, dl
shl edx, cl
or ebx, edx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
jmp 0x4086cf
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov edx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
shr ebx, 8
mov dword [esi + 0x48], ebx
lea eax, [edx - 8]
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x4086db
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jb 0x4086b0
mov edx, eax
jmp 0x4086be
mov ecx, dword [esp]
movzx edi, ch
mov ecx, eax
shl edi, cl
or ebx, edi
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], edx
jmp 0x40870f
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
shr ebx, 8
mov dword [esi + 0x48], ebx
lea edx, [eax - 8]
mov dword [esi + 0x44], edx
cmp edx, 7
jbe 0x40871b
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jb 0x4086f0
mov eax, edx
jmp 0x4086fe
movzx edi, byte [esp]
mov ecx, edx
shl edi, cl
or ebx, edi
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
jmp 0x408745
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40859f
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x408730
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x408730
mov eax, dword [esi + 0x48]
mov ecx, 0x10
mov dword [esi + 0x48], eax
mov dword [esi + 0x44], ecx
jmp 0x40878f
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
shr eax, 8
mov dword [esi + 0x48], eax
lea ecx, [edx - 8]
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40879b
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jb 0x408770
mov edx, ecx
jmp 0x40877e
mov edi, 0xffff
shl edi, cl
or eax, edi
mov dword [esi + 0x48], eax
add edx, 8
mov dword [esi + 0x44], edx
jmp 0x4087c5
shr eax, 8
mov dword [esi + 0x48], eax
add edx, 0xfffffff8
mov dword [esi + 0x44], edx
cmp edx, 7
jbe 0x40859f
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x4087b0
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x4087b0
mov edx, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov ebp, dword [edx]
sub ebp, ecx
mov edi, ebx
cmp ebx, ebp
jb 0x4087f2
mov edi, ebp
add ecx, dword [esi + 0x74]
push edi
push eax
push ecx
call fcn.0040cdd0
add esp, 0xc
add dword [esi + 0x8c], edi
cmp ebx, ebp
jbe 0x408812
sub ebx, edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], ebx
mov eax, dword [esi + 0x5c]
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
cmp ecx, 0x200
je case.0x4082f8.2
cmp ecx, 0x300
mov eax, 0x78c0
jmp case.0x4082f8.0
mov eax, 0x7880
imul ebp, eax, 0x4211
shr ebp, 0x13
mov ecx, ebp
shl ecx, 5
sub ebp, ecx
mov ecx, dword [esi + 0x44]
mov ebx, pe_nt_image_headers32
shl ebx, cl
add ebp, eax
add ebp, 0xe1
movzx ebp, bp
or ebx, dword [esi + 0x48]
sub eax, ebp
mov dword [esi + 0x48], ebx
sub ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
jb 0x4088d1
movzx eax, al
shl eax, cl
or eax, ebx
mov dword [esi + 0x48], eax
or ecx, 8
mov dword [esi + 0x44], ecx
mov ebp, edi
mov edi, dword [esp + 0x20]
jmp 0x4088a5
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4081c7
mov ebx, dword [esi + 0x30]
cmp ebx, dword [esi + 0x34]
jae 0x408890
lea ecx, [ebx + 1]
mov dword [esi + 0x30], ecx
mov byte [ebx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x408890
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40886c
mov ebp, dword [esi + 0x30]
cmp ebp, dword [esi + 0x34]
jae 0x4088c0
lea ecx, [ebp + 1]
mov dword [esi + 0x30], ecx
mov byte [ebp], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x4088c0