Function at 0x4085c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5114e1
mov eax, dword fs:[0]
push eax
sub esp, 0x920
mov eax, dword [0x577680]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
push 0
mov dword [ebp - 0x920], ebx
mov dword [ebp - 0x92c], ebx
mov dword [ebp - 0x928], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
movzx eax, word [ebp + 0x10]
push eax
movzx eax, word [ebp + 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x924], eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov dword [ebp - 0x91c], edi
call fcn.0040d000
test al, al
jne 0x4086bb
xor eax, eax
push 0x906
push eax
mov word [ebp - 0x918], ax
lea eax, [ebp - 0x916]
push eax
call fcn.004f2250
add esp, 0xc
xor edi, edi
xor esi, esi
lea ecx, [ecx]
xor eax, eax
test edi, edi
je 0x40869a
test eax, eax
je 0x40869a
lea ecx, [esi + eax]
lea edx, [ebp - 0x918]
lea edx, [edx + ecx*2]
lea ecx, [esi + eax]
mov cx, word [ebp + ecx*2 - 0x95c]
inc cx
add cx, word [edx - 2]
mov word [edx], cx
inc eax
cmp eax, 0x22
jl 0x408672
add esi, 0x22
inc edi
cmp esi, 0x484
jl 0x408670
movsx eax, word [ebp - 0x12]
mov edi, dword [ebp - 0x91c]
mov dword [0x578ad4], eax
push dword [ebp - 0x924]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
call fcn.0040d1e0
test al, al
jne 0x40873d
mov ecx, dword [0x578ad4]
test ecx, ecx
je 0x40873d
lea esp, [esp]
mov eax, ecx
and eax, 0x80000001
jns 0x4086ee
dec eax
or eax, 0xfffffffe
inc eax
jne 0x4086fb
mov eax, ecx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
jmp 0x408702
lea ecx, [ecx*2 + 1]
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, ecx
lea eax, [eax + eax*2]
sub edx, eax
mov dword [0x578ad4], ecx
sub edx, 0
je 0x40872c
sub edx, 2
je 0x40872f
dec edx
je 0x408730
jmp 0x408739
add ecx, 2
inc ecx
add ecx, 2
mov dword [0x578ad4], ecx
test ecx, ecx
jne 0x4086e0
lea eax, [edi + 1]
push eax
call fcn.004ef820
push dword [ebp - 0x91c]
mov edi, eax
push esi
push edi
call fcn.004f1130
mov eax, dword [ebp - 0x91c]
add esp, 0x10
mov byte [edi + eax], 0
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x91c], esi
mov dword [ebp - 4], 0
test edi, edi
je 0x40882e
test edi, 0xffff0000
jne 0x408809
movzx ebx, di
push 0
push ebx
call fcn.00403070
add esp, 8
test eax, eax
je 0x4087b4
push ebx
push eax
lea ecx, [ebp - 0x91c]
call fcn.00408a40
mov esi, dword [ebp - 0x91c]
mov ebx, dword [ebp - 0x920]
push edi
mov dword [ebp - 4], 1
call fcn.004f0683
mov eax, dword [0x5771f0]
add esp, 4
mov ecx, 0x5771f0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 2
test esi, esi
je 0x408848
test esi, 0xffff0000
jne 0x408848
movzx edi, si
push 0
push edi
call fcn.00403070
add esp, 8
test eax, eax
je 0x408850
push edi
push eax
mov ecx, ebx
call fcn.00408b00
jmp 0x408850
mov ecx, edi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408810
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x91c]
call fcn.0040c690
mov esi, dword [ebp - 0x91c]
jmp 0x4087ba
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp - 0x91c]
call fcn.0040c690
mov esi, dword [ebp - 0x91c]
jmp 0x4087ba
push esi
mov ecx, ebx
call fcn.004027b0
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x408871
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f0cd4
mov esp, ebp
pop ebp
ret 0xc