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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e27c8
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
push ebx
push edi
mov eax, dword [0x6396a8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [esi + 0x70], 0
lea ebx, [esi + 0x70]
jne 0x40c242
mov eax, dword [esi]
mov edx, dword [eax + 0x68]
mov ecx, esi
call edx
cmp byte [esi + 0x52], 0
jne 0x40c25c
cmp dword [esi + 0x48], 0
mov byte [esi + 0x78], 1
je 0x40b9ed
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, esi
call edx
push 0x7c
lea eax, [ebp - 0xd8]
push 0
push eax
call fcn.005b30e0
mov cl, byte [esi + 0x76]
mov edi, dword [esi + 0x6c]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x28]
add esp, 0xc
neg cl
mov dword [ebp - 0xd8], 0x7c
mov dword [ebp - 0xd4], 7
mov dword [ebp - 0xcc], edx
mov dword [ebp - 0xd0], eax
sbb ecx, ecx
and ecx, 0x3800
add edi, 0x3c
add ecx, 0x800
push edi
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x50], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov ecx, dword [esi + 0x6c]
push ebx
push ecx
lea ecx, [ebp - 0xd8]
call fcn.004021b0
test eax, eax
jne 0x40c255
mov edx, dword [esi]
mov eax, dword [edx + 0xbc]
mov ecx, esi
call eax
test al, al
je 0x40c255
mov eax, dword [esi + 0x6c]
mov edx, dword [eax + 0x24]
mov ecx, 0x18
sub ecx, dword [eax + 0x14]
mov ebx, 0x10
sub ebx, dword [eax + 0x18]
mov dword [ebp - 0x3c], ecx
mov ecx, 8
sub ecx, dword [eax + 0x1c]
mov dword [ebp - 0x40], edx
mov edx, dword [esi + 0xdc]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xe0]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0xd4]
cmp eax, 0x10
mov dword [ebp - 0x48], ecx
mov ecx, dword [esi + 0xd8]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], edx
jne 0x40be23
mov edi, dword [esi + 0xa4]
xor edx, edx
cmp edi, edx
mov dword [ebp - 0x14], edi
je 0x40c22c
cmp dword [esi + 0x38], edx
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], edx
je 0x40bbbe
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005b25e7
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov edx, eax
mov eax, dword [esi + 0x38]
add esp, 4
test ecx, ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], 0
jle 0x40bbbe
jmp 0x40bb47
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x4c]
add eax, 4
mov dword [ebp - 0x28], eax
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x34]
mov edi, edx
shl eax, cl
mov ecx, ebx
shr edi, cl
mov ecx, dword [ebp - 0x40]
and eax, dword [ebp - 0x38]
shl edi, cl
mov ecx, dword [ebp - 0x3c]
and edi, dword [ebp - 0x30]
or eax, edi
mov edi, edx
shr edi, cl
mov ecx, dword [ebp - 0x48]
shl edi, cl
mov ecx, dword [ebp - 0x1c]
and edi, dword [ebp - 0x44]
or eax, edi
cmp byte [ebp - 0xd], 0
mov word [ecx], ax
je 0x40bba0
shr edx, 0x18
cmp edx, 0xff
jge 0x40bba0
movzx edx, ax
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x18], edx
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x1c], 2
add eax, 1
cmp eax, ecx
mov dword [ebp - 0x20], eax
jl 0x40bb44
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
cmp byte [esi + 0x51], 0
je 0x40bda9
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x40bda9
cmp byte [esi + 0x77], 0
je 0x40bc27
movzx eax, word [edx]
mov ecx, edi
xor edi, edi
cmp dword [esi + 0x28], edi
mov dword [ebp - 0x18], eax
mov ebx, edx
jle 0x40bded
xor eax, eax
cmp dword [esi + 0x24], eax
jle 0x40bc09
mov dx, word [ebx]
mov word [ecx], dx
add eax, 1
add ecx, 2
add ebx, 2
cmp eax, dword [esi + 0x24]
jl 0x40bbf5
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
add edi, 1
cmp edi, dword [esi + 0x28]
lea ecx, [ecx + eax*2]
jl 0x40bbee
jmp 0x40bded
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
xor edi, edi
test eax, eax
jle 0x40bd36
jmp 0x40bc40
mov eax, dword [ecx]
movzx ebx, word [edx]
and eax, 0xff000000
add ecx, 4
add edx, 2
cmp eax, 0xff000000
jne 0x40bc5d
cmp word [ebp - 0x18], bx
je 0x40bc70
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
add edi, 1
cmp edi, eax
jl 0x40bc40
jmp 0x40bd36
push 0x2000
call fcn.005b25e7
push 0x2000
mov edi, eax
push 0
push edi
mov dword [ebp - 0x28], edi
call fcn.005b30e0
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x38]
mov ebx, dword [ebp - 0x24]
add esp, 0x10
test ecx, ecx
mov dword [ebp - 0x20], 0
jle 0x40bced
mov eax, dword [edx]
movzx ecx, word [ebx]
shr eax, 0x18
add edx, 4
add ebx, 2
test eax, eax
jle 0x40bcdd
movzx ecx, cx
mov eax, ecx
shr eax, 5
and ecx, 0x8000001f
lea eax, [edi + eax*4]
jns 0x40bcd1
dec ecx
or ecx, 0xffffffe0
inc ecx
mov edi, 1
shl edi, cl
or dword [eax], edi
mov edi, dword [ebp - 0x28]
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
add dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], ecx
jl 0x40bca7
xor edx, edx
nop
mov eax, dword [edi + edx*4]
cmp eax, 0xffff
je 0x40bd22
xor ecx, ecx
lea esp, [esp]
mov ebx, 1
shl ebx, cl
test eax, ebx
je 0x40bd15
add ecx, 1
cmp ecx, 0x20
jl 0x40bd00
jmp 0x40bd22
mov eax, edx
shl eax, 5
add eax, ecx
movzx ecx, ax
mov dword [ebp - 0x18], ecx
add edx, 1
cmp edx, 0x800
jl 0x40bcf0
push edi
call fcn.005b28f2
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40bded
cmp dword [esi + 0x28], 0
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x24]
mov edi, eax
mov dword [ebp - 0x14], 0
jle 0x40bded
xor edx, edx
cmp dword [esi + 0x24], edx
jle 0x40bd88
mov eax, dword [edi]
shr eax, 0x18
add edi, 4
cmp eax, 0xff
mov ax, word [ebp - 0x18]
jl 0x40bd77
mov ax, word [ebx]
mov word [ecx], ax
add edx, 1
add ecx, 2
add ebx, 2
cmp edx, dword [esi + 0x24]
jl 0x40bd61
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
lea ecx, [ecx + eax*2]
mov eax, dword [ebp - 0x14]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [ebp - 0x14], eax
jl 0x40bd5a
jmp 0x40bded
test edx, edx
je 0x40bded
mov ecx, edi
xor edi, edi
cmp dword [esi + 0x28], edi
mov ebx, edx
jle 0x40bded
xor eax, eax
cmp dword [esi + 0x24], eax
jle 0x40bdd4
nop
mov dx, word [ebx]
mov word [ecx], dx
add eax, 1
add ecx, 2
add ebx, 2
cmp eax, dword [esi + 0x24]
jl 0x40bdc0
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
add edi, 1
cmp edi, dword [esi + 0x28]
lea ecx, [ecx + eax*2]
jl 0x40bdb8
mov eax, dword [ebp - 0x24]
push eax
call fcn.005b28f2
add esp, 4
cmp byte [esi + 0x51], 0
je 0x40c22c
movzx eax, word [ebp - 0x18]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x70]
mov ecx, dword [eax]
lea edx, [ebp - 0x2c]
push edx
push 8
push eax
mov eax, dword [ecx + 0x74]
call eax
jmp 0x40c22c
cmp eax, 0x20
jne 0x40c255
mov edi, dword [esi + 0xa4]
test edi, edi
mov dword [ebp - 0x20], edi
je 0x40c22c
cmp byte [esi + 0x51], 0
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x18], 0
je 0x40c17e
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40c17e
cmp byte [esi + 0x77], 0
je 0x40bf51
mov eax, dword [eax]
mov ecx, dword [ebp - 0x4c]
mov edi, eax
shr edi, cl
mov ecx, dword [ebp - 0x34]
mov edx, eax
shl edi, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [ebp - 0x40]
and edi, dword [ebp - 0x38]
shl edx, cl
mov ecx, dword [ebp - 0x3c]
shr eax, cl
mov ecx, dword [ebp - 0x48]
and edx, dword [ebp - 0x30]
shl eax, cl
or edi, edx
and eax, dword [ebp - 0x44]
or edi, eax
cmp dword [esi + 0x28], 0
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], 0
jle 0x40c15f
jmp 0x40bec0
cmp dword [esi + 0x24], 0
mov dword [ebp - 0x1c], 0
jle 0x40bf25
lea ecx, [ecx]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
add ecx, 4
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x4c]
mov edx, eax
shr edx, cl
mov ecx, dword [ebp - 0x34]
add edi, 4
shl edx, cl
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov ecx, ebx
and edx, dword [ebp - 0x38]
mov ebx, eax
shr ebx, cl
mov ecx, dword [ebp - 0x40]
shl ebx, cl
mov ecx, dword [ebp - 0x3c]
shr eax, cl
mov ecx, dword [ebp - 0x48]
and ebx, dword [ebp - 0x30]
shl eax, cl
or edx, ebx
mov ebx, dword [ebp - 0x24]
and eax, dword [ebp - 0x44]
or edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [edi - 4], edx
add eax, 1
cmp eax, dword [esi + 0x24]
mov dword [ebp - 0x1c], eax
jl 0x40bed0
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [ebp - 0x20]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [ebp - 0x20], eax
jl 0x40bec0
jmp 0x40c15f
mov edi, dword [esi + 0x24]
imul edi, dword [esi + 0x28]
test edi, edi
mov ecx, eax
jle 0x40bf8d
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx]
add ecx, 4
cmp byte [ebp - 0xd], 0
je 0x40bf87
mov edx, eax
shr edx, 0x18
cmp edx, 0xff
jge 0x40bf87
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x18], eax
sub dword [ebp - 0x14], 1
jne 0x40bf68
mov ecx, dword [esi + 0x38]
xor edx, edx
test edi, edi
jle 0x40c097
lea ebx, [ebx]
mov eax, dword [ecx]
mov edi, eax
and edi, 0xff000000
add ecx, 4
cmp edi, 0xff000000
jne 0x40bfbf
and eax, 0xffffff
cmp dword [ebp - 0x18], eax
je 0x40bfd2
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
add edx, 1
cmp edx, eax
jl 0x40bfa0
jmp 0x40c097
push 0x200000
call fcn.005b25e7
push 0x200000
mov edi, eax
push 0
push edi
mov dword [ebp - 0x1c], edi
call fcn.005b30e0
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x38]
add esp, 0x10
test ecx, ecx
mov dword [ebp - 0x14], 0
jle 0x40c047
mov ecx, dword [eax]
mov edx, ecx
add eax, 4
shr edx, 0x18
test edx, edx
mov dword [ebp - 0x28], eax
jle 0x40c033
mov eax, ecx
shr eax, 5
and ecx, 0x1f
mov edx, 1
and eax, 0x7ffff
shl edx, cl
lea eax, [edi + eax*4]
or dword [eax], edx
mov eax, dword [ebp - 0x28]
mov edx, dword [esi + 0x24]
imul edx, dword [esi + 0x28]
mov ecx, dword [ebp - 0x14]
add ecx, 1
cmp ecx, edx
mov dword [ebp - 0x14], ecx
jl 0x40c006
xor edx, edx
lea esp, [esp]
mov eax, dword [edi + edx*4]
cmp eax, 0xffff
je 0x40c076
xor ecx, ecx
lea esp, [esp]
mov edi, 1
shl edi, cl
test eax, edi
je 0x40c083
add ecx, 1
cmp ecx, 0x20
jl 0x40c060
mov edi, dword [ebp - 0x1c]
add edx, 1
cmp edx, 0x80000
jl 0x40c050
jmp 0x40c08e
mov edi, dword [ebp - 0x1c]
shl edx, 5
add edx, ecx
mov dword [ebp - 0x18], edx
push edi
call fcn.005b28f2
add esp, 4
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x40c15f
cmp dword [esi + 0x28], 0
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], 0
jle 0x40c15f
jmp 0x40c0c0
cmp dword [esi + 0x24], 0
mov dword [ebp - 0x14], 0
jle 0x40c138
lea ecx, [ecx]
mov eax, dword [ecx]
mov edx, eax
add ecx, 4
shr edx, 0x18
cmp edx, 0xff
mov dword [ebp - 0x20], ecx
jge 0x40c0ec
mov eax, dword [ebp - 0x18]
mov dword [edi], eax
jmp 0x40c127
mov ecx, dword [ebp - 0x4c]
mov edx, eax
shr edx, cl
mov ecx, dword [ebp - 0x34]
shl edx, cl
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov ecx, ebx
and edx, dword [ebp - 0x38]
mov ebx, eax
shr ebx, cl
mov ecx, dword [ebp - 0x40]
shl ebx, cl
mov ecx, dword [ebp - 0x3c]
shr eax, cl
mov ecx, dword [ebp - 0x48]
and ebx, dword [ebp - 0x30]
shl eax, cl
mov ecx, dword [ebp - 0x20]
or edx, ebx
mov ebx, dword [ebp - 0x24]
and eax, dword [ebp - 0x44]
or edx, eax
mov dword [edi], edx
mov eax, dword [ebp - 0x14]
add eax, 1
add edi, 4
cmp eax, dword [esi + 0x24]
mov dword [ebp - 0x14], eax
jl 0x40c0d0
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [ebp - 0x1c]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [ebp - 0x1c], eax
jl 0x40c0c0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov eax, dword [esi + 0x70]
mov ecx, dword [eax]
lea edx, [ebp - 0x58]
push edx
push 8
push eax
mov eax, dword [ecx + 0x74]
call eax
jmp 0x40c22c
mov eax, dword [esi + 0x38]
test eax, eax
je 0x40c22c
cmp dword [esi + 0x28], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
jle 0x40c22c
lea ecx, [ecx]
cmp dword [esi + 0x24], 0
mov dword [ebp - 0x1c], 0
jle 0x40c205
lea ecx, [ecx]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
add ecx, 4
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x4c]
mov edx, eax
shr edx, cl
mov ecx, dword [ebp - 0x34]
add edi, 4
shl edx, cl
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov ecx, ebx
and edx, dword [ebp - 0x38]
mov ebx, eax
shr ebx, cl
mov ecx, dword [ebp - 0x40]
shl ebx, cl
mov ecx, dword [ebp - 0x3c]
shr eax, cl
mov ecx, dword [ebp - 0x48]
and ebx, dword [ebp - 0x30]
shl eax, cl
or edx, ebx
mov ebx, dword [ebp - 0x24]
and eax, dword [ebp - 0x44]
or edx, eax
mov eax, dword [ebp - 0x1c]
mov dword [edi - 4], edx
add eax, 1
cmp eax, dword [esi + 0x24]
mov dword [ebp - 0x1c], eax
jl 0x40c1b0
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [ebp - 0x18]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [ebp - 0x18], eax
jl 0x40c1a0
mov eax, dword [esi]
mov edx, dword [eax + 0xc0]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret