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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x6c
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], eax
test eax, eax
je 0x408b9b
mov ebp, eax
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x54], eax
mov ecx, dword [eax + 0x90]
mov dword [esp + 0x50], ecx
movsx edx, dl
neg edx
inc edx
mov byte [eax + 0x86], dl
test ecx, ecx
je 0x408b9b
movsx edx, byte [eax + 0x48]
test edx, edx
jne 0x408ba5
xor eax, eax
add esp, 0x6c
pop ebx
pop ebp
pop esi
pop edi
ret
mov ebx, eax
mov ebp, dword [ebx + 0x28]
mov ebx, dword [ebx + 0x2c]
mov eax, ebx
sub eax, 0
jge 0x408bc4
xor ebp, ebp
xor ebx, ebx
xor eax, eax
mov edx, dword [esp + 0x54]
mov dword [edx + 0x28], eax
mov dword [edx + 0x2c], eax
mov ecx, dword [esp + 0x54]
mov ecx, dword [ecx + 0x78]
dec ecx
mov eax, ecx
cdq
mov dword [esp + 0x2c], edx
sub ebp, ecx
sbb ebx, edx
jl 0x408be7
or ebp, ebx
je 0x408be7
mov ebx, dword [esp + 0x54]
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], edx
mov ebx, dword [esp + 0x54]
mov ebp, dword [ebx + 0x30]
mov ebx, dword [ebx + 0x34]
mov edx, ebx
sub edx, 0
jge 0x408c08
xor ebp, ebp
xor ebx, ebx
xor edx, edx
mov esi, dword [esp + 0x54]
mov dword [esi + 0x30], edx
mov dword [esi + 0x34], edx
mov esi, dword [esp + 0x54]
mov eax, dword [esi + 0x7c]
dec eax
cdq
sub ebp, eax
sbb ebx, edx
jl 0x408c23
or ebp, ebx
je 0x408c23
mov ebx, esi
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], edx
mov ebx, esi
mov ebp, dword [ebx + 0x38]
mov ebx, dword [ebx + 0x3c]
mov esi, ebx
sub esi, 0
jge 0x408c42
xor ebp, ebp
xor ebx, ebx
xor esi, esi
mov edi, dword [esp + 0x54]
mov dword [edi + 0x38], esi
mov dword [edi + 0x3c], esi
sub ebp, ecx
mov esi, dword [esp + 0x2c]
sbb ebx, esi
jl 0x408c5c
or ebp, ebx
je 0x408c5c
mov ebx, dword [esp + 0x54]
mov dword [ebx + 0x38], ecx
mov ecx, esi
mov dword [ebx + 0x3c], ecx
mov ebx, dword [esp + 0x54]
mov ecx, dword [ebx + 0x40]
mov esi, dword [ebx + 0x44]
mov ebp, esi
sub ebp, 0
jge 0x408c7d
xor ecx, ecx
xor esi, esi
xor ebx, ebx
mov ebp, dword [esp + 0x54]
mov dword [ebp + 0x40], ebx
mov dword [ebp + 0x44], ebx
sub ecx, eax
sbb esi, edx
jl 0x408c91
or ecx, esi
je 0x408c91
mov ecx, dword [esp + 0x54]
mov dword [ecx + 0x40], eax
mov dword [ecx + 0x44], edx
mov eax, dword [esp + 0x68]
xor edx, edx
call fcn.004098c4
mov eax, dword [esp + 0x68]
mov ebp, dword [eax + 4]
mov ebx, dword [eax + 0x20]
lea ecx, [ebx - 1]
mov esi, ecx
test ecx, ecx
jl 0x408cd3
mov dword [esp + 0x1c], ebx
cmp esi, ecx
jge 0x408cba
mov ebp, dword [ebp + 8]
mov edi, dword [ebp + 0x34]
cmp byte [edi + 0x89], 1
je 0x409798
dec esi
test esi, esi
jge 0x408cb3
mov ebx, dword [esp + 0x1c]
cmp esi, 0xffffffff
jne 0x408d42
mov ecx, dword [esp + 0x54]
mov esi, dword [ecx + 0x30]
mov eax, esi
cdq
mov ebp, esi
sub ebp, dword [ecx + 0x40]
sbb edx, dword [ecx + 0x44]
jl 0x408cf4
or ebp, edx
jne 0x409130
mov ebx, dword [esp + 0x50]
mov ebp, ecx
mov edx, dword [ebp + 0x78]
add edx, edx
add edx, edx
imul edx, esi
mov ecx, dword [ebp + 0x28]
lea eax, [ecx + ecx]
add eax, eax
add eax, ebx
add eax, edx
mov edi, dword [ebp + 0x38]
sub edi, ecx
add edi, 1
add edi, edi
add edi, edi
push edi
push eax
call dword [0x5cf480]
add esp, 8
inc esi
mov eax, esi
cdq
mov ecx, esi
sub ecx, dword [ebp + 0x40]
sbb edx, dword [ebp + 0x44]
jl 0x408cfa
or ecx, edx
je 0x408cfa
xor esi, esi
mov eax, dword [esp + 0x68]
mov ebx, dword [eax + 0x20]
lea edx, [esi + 1]
mov eax, dword [esp + 0x68]
call fcn.0040471c
mov ebp, eax
xor edi, edi
mov dword [esp + 0x4c], edi
cmp esi, ebx
jge 0x408b9b
movsx edx, byte [ebp + 0x30]
test edx, edx
je 0x408d79
mov ebx, dword [esp + 0x64]
lea ecx, [ebx + 1]
mov eax, ebp
mov edx, 1
call fcn.00408b5d
mov ebx, dword [ebp + 0x34]
movsx ecx, byte [ebx + 0x89]
test ecx, ecx
je 0x408d92
movsx ecx, word [ebx + 0x80]
test ecx, ecx
jne 0x408d9a
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov ecx, dword [ebx + 0x4c]
movsx edi, byte [ecx]
test edi, edi
je 0x408db7
movsx ecx, word [ebx + 0x82]
test ecx, ecx
jne 0x408db7
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov ecx, dword [esp + 0x54]
mov edx, dword [ecx + 0x38]
mov dword [esp + 0x58], edx
mov eax, dword [ecx + 0x3c]
mov dword [esp + 0x5c], eax
mov edi, dword [ebx + 0x68]
mov dword [esp + 0x60], edi
mov ecx, dword [ebx + 0x6c]
sub edi, edx
mov edx, ecx
sbb edx, eax
jl 0x408de7
or edi, edx
je 0x408de7
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov dword [esp + 0x48], ecx
mov edi, dword [esp + 0x54]
mov edx, dword [edi + 0x40]
mov dword [esp + 0x38], edx
mov ecx, dword [edi + 0x44]
mov dword [esp + 0x3c], ecx
mov edi, dword [ebx + 0x70]
mov dword [esp + 0x40], edi
mov eax, dword [ebx + 0x74]
mov dword [esp + 0x44], eax
sub edi, edx
sbb eax, ecx
mov ecx, dword [esp + 0x48]
jl 0x408e21
or edi, eax
je 0x408e21
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x54]
mov ebp, dword [eax + 0x28]
mov dword [esp + 0x30], ebp
mov edi, dword [eax + 0x2c]
mov dword [esp + 0x28], edi
mov eax, dword [ebx + 0x78]
cdq
mov ebx, dword [esp + 0x60]
add eax, ebx
mov dword [esp + 0x34], eax
adc edx, ecx
mov dword [esp + 0x2c], edx
sub eax, ebp
sbb edx, edi
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
jl 0x408e61
or eax, edx
jne 0x408e69
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov dword [esp + 0x24], ebx
mov dword [esp + 0x48], ecx
mov edi, dword [esp + 0x54]
mov ecx, dword [edi + 0x30]
mov dword [esp + 0x14], ecx
mov edi, dword [edi + 0x34]
mov dword [esp + 0x50], edi
mov eax, dword [ebx + 0x7c]
cdq
mov ebx, dword [esp + 0x40]
add eax, ebx
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x44]
adc edx, ebx
sub eax, ecx
mov ebx, edx
mov ecx, edi
sbb ebx, ecx
mov dword [esp + 0x18], ebx
mov ecx, dword [esp + 0x48]
mov ebx, dword [esp + 0x24]
jl 0x408eb3
or eax, dword [esp + 0x18]
jne 0x408ebb
mov ebp, dword [ebp + 0xc]
jmp 0x409123
movsx edi, byte [ebx + 0xa4]
test edi, edi
je 0x408ece
mov ebp, dword [ebp + 0xc]
jmp 0x409123
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x60]
sub eax, edi
mov edi, dword [esp + 0x28]
sbb ecx, edi
jge 0x408eeb
mov ecx, 4
mov dword [esp + 0x18], ecx
jmp 0x408ef1
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x40]
sub edi, ecx
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x44]
sbb edi, ecx
jge 0x408f0c
or dword [esp + 0x18], 1
mov eax, dword [esp + 0x34]
add eax, 0xffffffff
mov ecx, dword [esp + 0x2c]
adc ecx, 0xffffffff
mov edi, dword [esp + 0x58]
sub eax, edi
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x5c]
sbb ecx, edi
mov dword [esp + 0x2c], ecx
jl 0x408f3d
mov ecx, eax
or ecx, dword [esp + 0x2c]
je 0x408f3d
or dword [esp + 0x18], 8
mov edi, dword [esp + 0x1c]
add edi, 0xffffffff
adc edx, 0xffffffff
mov ecx, dword [esp + 0x38]
sub edi, ecx
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x3c]
sbb edx, ecx
jl 0x408f64
mov ecx, edi
or ecx, edx
je 0x408f64
or dword [esp + 0x18], 2
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0x54]
mov edx, ebx
mov ecx, dword [esp + 0x18]
call fcn.00409984
mov ecx, dword [ebx + 0x4c]
movsx edi, byte [ecx]
test edi, edi
jne 0x408f93
xor ecx, ecx
mov dword [esp + 0x50], ecx
xor edi, edi
mov dword [esp + 0x2c], edi
jmp 0x408fed
xor ecx, ecx
mov byte [0x5cf640], cl
mov byte [esp + 0xc], cl
mov eax, 0x5cf640
mov edx, dword [ebx + 0x4c]
mov ecx, dword [0x800828]
call fcn.004142f8
movsx ecx, al
test ecx, ecx
jl 0x4098ac
mov eax, dword [0x800818]
mov edx, 0x5cf640
xor ecx, ecx
call fcn.0041467d
mov dword [esp + 0x4c], eax
mov ecx, eax
test ecx, ecx
je 0x409787
mov edi, dword [ecx + 0x34]
mov dword [esp + 0x50], edi
mov ecx, dword [edi + 0x90]
mov dword [esp + 0x2c], ecx
cmp dword [ebx + 0x90], 0
je 0x40911c
cmp byte [ebx + 0x86], 1
je 0x4093d0
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x409022
movsx ecx, word [ebx + 0x82]
cmp ecx, 0x100
jl 0x409137
movsx ecx, byte [0x5b26f4]
test ecx, ecx
jle 0x4090fb
xor eax, eax
xor edi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], esi
mov ebx, eax
mov dword [edi + 0x7b1664], 0x65
mov ebp, dword [0x800e34]
mov esi, ebx
imul esi, ebp
mov eax, esi
cdq
idiv ecx
mov dword [edi + 0x7b167c], eax
add ebp, esi
mov eax, ebp
cdq
idiv ecx
mov dword [edi + 0x7b1684], eax
mov ecx, dword [0x800e30]
mov dword [edi + 0x7b16a0], ecx
mov edx, dword [0x800e20]
mov dword [edi + 0x7b16a4], edx
mov edx, dword [0x800e24]
mov dword [edi + 0x7b16a8], edx
mov edx, dword [0x800e28]
mov dword [edi + 0x7b16ac], edx
mov edx, dword [0x800e2c]
mov dword [edi + 0x7b16b0], edx
mov edx, dword [esp + 0x54]
mov dword [edi + 0x7b16b8], edx
mov edx, dword [esp + 0x24]
mov dword [edi + 0x7b16bc], edx
push dword [ebx*4 + 0x7b3060]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [ebx*4 + 0x7b3160]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0x68
inc ebx
movsx ecx, byte [0x5b26f4]
cmp ebx, ecx
jl 0x409043
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
test ecx, ecx
jle 0x40911c
xor edi, edi
push 0xffffffffffffffff
push dword [edi*4 + 0x7b3260]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
movsx ecx, byte [0x5b26f4]
cmp edi, ecx
jl 0x409101
mov byte [ebx + 0x4b], 1
mov ebp, dword [ebp + 0xc]
inc esi
mov edx, dword [esp + 0x68]
mov ebx, dword [edx + 0x20]
jmp 0x408d56
xor esi, esi
jmp 0x408d42
mov edx, dword [ebx + 0x78]
mov edi, dword [esp + 0x50]
mov edi, dword [edi + 0x78]
mov dword [esp + 0x60], edi
cmp edx, edi
jne 0x4093be
mov eax, dword [ebx + 0x7c]
mov edi, dword [esp + 0x50]
mov edi, dword [edi + 0x7c]
mov dword [esp + 0x14], edi
cmp eax, edi
jne 0x40938e
movsx eax, word [ebx + 0x84]
movsx edi, word [ebx + 0x80]
mov dword [esp + 0x28], edi
cmp eax, 0x100
je 0x409301
mov edx, eax
sar edx, 1
imul edx, ecx
mov edi, eax
shl edi, 7
sub edx, edi
add edx, ecx
mov dword [esp + 0x14], edx
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x10], esi
mov esi, edi
sar esi, 1
add esi, edx
cmp esi, 0xff
jle 0x4091af
mov esi, 0xff
inc esi
mov dword [ecx + 0x787240], esi
add edi, eax
add ecx, 4
cmp ecx, 0x400
jl 0x40919c
mov esi, dword [esp + 0x10]
xor ecx, ecx
mov eax, dword [esp + 0x28]
mov edi, dword [ecx + 0x787240]
imul edi, eax
sar edi, 8
mov dword [ecx + 0x787240], edi
add ecx, 4
cmp ecx, 0x400
jl 0x4091cd
movsx ecx, byte [0x5b26f4]
test ecx, ecx
jle 0x4092d7
xor eax, eax
xor edi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], esi
mov ebx, eax
mov dword [edi + 0x7b1664], 0x66
mov ebp, dword [0x800e34]
mov esi, ebx
imul esi, ebp
mov eax, esi
cdq
idiv ecx
mov dword [edi + 0x7b167c], eax
add ebp, esi
mov eax, ebp
cdq
idiv ecx
mov dword [edi + 0x7b1684], eax
mov ecx, dword [0x800e30]
mov dword [edi + 0x7b16a0], ecx
mov edx, dword [0x800e20]
mov dword [edi + 0x7b16a4], edx
mov edx, dword [0x800e24]
mov dword [edi + 0x7b16a8], edx
mov edx, dword [0x800e28]
mov dword [edi + 0x7b16ac], edx
mov edx, dword [0x800e2c]
mov dword [edi + 0x7b16b0], edx
mov edx, dword [esp + 0x54]
mov dword [edi + 0x7b16b8], edx
mov edx, dword [esp + 0x24]
mov dword [edi + 0x7b16bc], edx
mov edx, dword [esp + 0x50]
mov dword [edi + 0x7b16c0], edx
mov edx, dword [esp + 0x2c]
mov dword [edi + 0x7b16c4], edx
push dword [ebx*4 + 0x7b3060]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [ebx*4 + 0x7b3160]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0x68
inc ebx
movsx ecx, byte [0x5b26f4]
cmp ebx, ecx
jl 0x40920b
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
test ecx, ecx
jle 0x40911c
xor edi, edi
push 0xffffffffffffffff
push dword [edi*4 + 0x7b3260]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
movsx ecx, byte [0x5b26f4]
cmp edi, ecx
jl 0x4092e1
jmp 0x40911c
mov edi, ecx
neg edi
mov dword [esp + 0x18], edi
lea edi, [edi + 0x100]
mov dword [esp + 0x14], edi
cmp edi, 0x320
jg 0x409371
neg ecx
cmp ecx, 0xffffff01
jl 0x40933a
mov ecx, 1
mov dword [ecx*4 + 0x78723c], 0
inc ecx
cmp ecx, edi
jle 0x40932a
mov ecx, dword [esp + 0x14]
cmp ecx, 0x100
jge 0x4091c7
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx + 0x200]
add ecx, ecx
mov dword [ecx + 0x787240], 0x100
add ecx, 4
cmp ecx, 0x400
jl 0x409357
jmp 0x4091c7
mov ecx, dword [esp + 0x18]
lea edi, [ecx*4 + 0x400]
push edi
push 0
push 0x787240
call fcn.00464c38
add esp, 0xc
jmp 0x40933a
mov ecx, edi
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x4c]
push ecx
push esi
push dword [edi + 0x14]
push eax
push edx
push dword [ebp + 0x14]
push 1
push 0x187d6
call fcn.00463e98
mov eax, 0xffffffff
add esp, 0x8c
pop ebx
pop ebp
pop esi
pop edi
ret
mov esi, edi
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov eax, dword [ebx + 0x7c]
mov ecx, dword [ecx + 0x7c]
jmp 0x409398
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x4093eb
movsx ecx, word [ebx + 0x82]
cmp ecx, 0x100
jl 0x4094ee
movsx ecx, byte [0x5b26f4]
test ecx, ecx
jle 0x4094c4
xor eax, eax
xor edi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], esi
mov ebx, eax
mov dword [edi + 0x7b1664], 0x67
mov ebp, dword [0x800e34]
mov esi, ebx
imul esi, ebp
mov eax, esi
cdq
idiv ecx
mov dword [edi + 0x7b167c], eax
add ebp, esi
mov eax, ebp
cdq
idiv ecx
mov dword [edi + 0x7b1684], eax
mov ecx, dword [0x800e30]
mov dword [edi + 0x7b16a0], ecx
mov edx, dword [0x800e20]
mov dword [edi + 0x7b16a4], edx
mov edx, dword [0x800e24]
mov dword [edi + 0x7b16a8], edx
mov edx, dword [0x800e28]
mov dword [edi + 0x7b16ac], edx
mov edx, dword [0x800e2c]
mov dword [edi + 0x7b16b0], edx
mov edx, dword [esp + 0x54]
mov dword [edi + 0x7b16b8], edx
mov edx, dword [esp + 0x24]
mov dword [edi + 0x7b16bc], edx
push dword [ebx*4 + 0x7b3060]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [ebx*4 + 0x7b3160]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0x68
inc ebx
movsx ecx, byte [0x5b26f4]
cmp ebx, ecx
jl 0x40940c
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
test ecx, ecx
jle 0x40911c
xor edi, edi
push 0xffffffffffffffff
push dword [edi*4 + 0x7b3260]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
movsx ecx, byte [0x5b26f4]
cmp edi, ecx
jl 0x4094ce
jmp 0x40911c
mov edx, dword [ebx + 0x78]
mov edi, dword [esp + 0x50]
mov edi, dword [edi + 0x78]
mov dword [esp + 0x60], edi
cmp edx, edi
jne 0x409775
mov eax, dword [ebx + 0x7c]
mov edi, dword [esp + 0x50]
mov edi, dword [edi + 0x7c]
mov dword [esp + 0x14], edi
cmp eax, edi
jne 0x409745
movsx eax, word [ebx + 0x84]
movsx edi, word [ebx + 0x80]
mov dword [esp + 0x28], edi
cmp eax, 0x100
je 0x4096b8
mov edx, eax
sar edx, 1
imul edx, ecx
mov edi, eax
shl edi, 7
sub edx, edi
add edx, ecx
mov dword [esp + 0x14], edx
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x10], esi
mov esi, edi
sar esi, 1
add esi, edx
cmp esi, 0xff
jle 0x409566
mov esi, 0xff
inc esi
mov dword [ecx + 0x787240], esi
add edi, eax
add ecx, 4
cmp ecx, 0x400
jl 0x409553
mov esi, dword [esp + 0x10]
xor ecx, ecx
mov eax, dword [esp + 0x28]
mov edi, dword [ecx + 0x787240]
imul edi, eax
sar edi, 8
mov dword [ecx + 0x787240], edi
add ecx, 4
cmp ecx, 0x400
jl 0x409584
movsx ecx, byte [0x5b26f4]
test ecx, ecx
jle 0x40968e
xor eax, eax
xor edi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], esi
mov ebx, eax
mov dword [edi + 0x7b1664], 0x68
mov ebp, dword [0x800e34]
mov esi, ebx
imul esi, ebp
mov eax, esi
cdq
idiv ecx
mov dword [edi + 0x7b167c], eax
add ebp, esi
mov eax, ebp
cdq
idiv ecx
mov dword [edi + 0x7b1684], eax
mov ecx, dword [0x800e30]
mov dword [edi + 0x7b16a0], ecx
mov edx, dword [0x800e20]
mov dword [edi + 0x7b16a4], edx
mov edx, dword [0x800e24]
mov dword [edi + 0x7b16a8], edx
mov edx, dword [0x800e28]
mov dword [edi + 0x7b16ac], edx
mov edx, dword [0x800e2c]
mov dword [edi + 0x7b16b0], edx
mov edx, dword [esp + 0x54]
mov dword [edi + 0x7b16b8], edx
mov edx, dword [esp + 0x24]
mov dword [edi + 0x7b16bc], edx
mov edx, dword [esp + 0x50]
mov dword [edi + 0x7b16c0], edx
mov edx, dword [esp + 0x2c]
mov dword [edi + 0x7b16c4], edx
push dword [ebx*4 + 0x7b3060]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [ebx*4 + 0x7b3160]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0x68
inc ebx
movsx ecx, byte [0x5b26f4]
cmp ebx, ecx
jl 0x4095c2
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
test ecx, ecx
jle 0x40911c
xor edi, edi
push 0xffffffffffffffff
push dword [edi*4 + 0x7b3260]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
movsx ecx, byte [0x5b26f4]
cmp edi, ecx
jl 0x409698
jmp 0x40911c
mov edi, ecx
neg edi
mov dword [esp + 0x18], edi
lea edi, [edi + 0x100]
mov dword [esp + 0x14], edi
cmp edi, 0x320
jg 0x409728
neg ecx
cmp ecx, 0xffffff01
jl 0x4096f1
mov ecx, 1
mov dword [ecx*4 + 0x78723c], 0
inc ecx
cmp ecx, edi
jle 0x4096e1
mov ecx, dword [esp + 0x14]
cmp ecx, 0x100
jge 0x40957e
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx + 0x200]
add ecx, ecx
mov dword [ecx + 0x787240], 0x100
add ecx, 4
cmp ecx, 0x400
jl 0x40970e
jmp 0x40957e
mov ecx, dword [esp + 0x18]
lea edi, [ecx*4 + 0x400]
push edi
push 0
push 0x787240
call fcn.00464c38
add esp, 0xc
jmp 0x4096f1
mov ecx, edi
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x4c]
push ecx
push esi
push dword [edi + 0x14]
push eax
push edx
push dword [ebp + 0x14]
push 1
push 0x187d6
call fcn.00463e98
mov eax, 0xffffffff
add esp, 0x8c
pop ebx
pop ebp
pop esi
pop edi
ret
mov esi, edi
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov eax, dword [ebx + 0x7c]
mov ecx, dword [ecx + 0x7c]
jmp 0x40974f
xor ecx, ecx
mov dword [esp + 0x50], ecx
xor edi, edi
mov dword [esp + 0x2c], edi
jmp 0x408fed
movsx eax, byte [edi + 0x87]
test eax, eax
jne 0x408cca
movsx eax, word [edi + 0x80]
cmp eax, 0x100
jne 0x408cca
movsx eax, byte [edi + 0x86]
test eax, eax
jne 0x408cca
mov eax, dword [edi + 0x4c]
movsx eax, byte [eax]
test eax, eax
jne 0x409886
mov edx, dword [edi + 0x68]
mov dword [esp + 0x58], edx
mov ebx, dword [edi + 0x6c]
mov eax, dword [esp + 0x54]
sub edx, dword [eax + 0x28]
mov dword [esp + 0x5c], edx
mov edx, ebx
sbb edx, dword [eax + 0x2c]
mov dword [esp + 0x60], edx
jl 0x409804
mov eax, dword [esp + 0x5c]
or eax, dword [esp + 0x60]
jne 0x408cca
mov dword [esp + 0x48], ebx
mov eax, dword [edi + 0x70]
mov dword [esp + 0x5c], eax
mov ebx, dword [edi + 0x74]
mov dword [esp + 0x60], ebx
mov edx, dword [esp + 0x54]
sub eax, dword [edx + 0x30]
sbb ebx, dword [edx + 0x34]
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x48]
jl 0x409834
or eax, dword [esp + 0x34]
jne 0x408cca
mov dword [esp + 0x10], esi
mov eax, dword [edi + 0x78]
cdq
mov esi, dword [esp + 0x58]
add esi, eax
adc ebx, edx
add esi, 0xffffffff
adc ebx, 0xffffffff
mov eax, dword [esp + 0x54]
sub esi, dword [eax + 0x38]
sbb ebx, dword [eax + 0x3c]
mov esi, dword [esp + 0x10]
jl 0x408cca
mov eax, dword [edi + 0x7c]
cdq
mov ebx, dword [esp + 0x5c]
add ebx, eax
mov eax, dword [esp + 0x60]
adc eax, edx
add ebx, 0xffffffff
adc eax, 0xffffffff
mov edi, dword [esp + 0x54]
sub ebx, dword [edi + 0x40]
sbb eax, dword [edi + 0x44]
jl 0x408cca
jmp 0x4098a3
je 0x408cca
movsx eax, word [edi + 0x82]
cmp eax, 0x100
je 0x4097d6
jmp 0x408cca
mov ebx, dword [esp + 0x1c]
jmp 0x408d42
mov eax, 0xffffffff
add esp, 0x6c
pop ebx
pop ebp
pop esi
pop edi
ret