Function at 0x408007
Capabilities:
Check if file exists
Extract resource via kernel32 functions

Disassembly:
push ebp
lea ebp, [esp - 0x1148]
mov eax, 0x1148
call fcn.00447a80
push 0xffffffffffffffff
push 0x4b30a0
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x4f04c0]
xor eax, ebp
mov dword [ebp + 0x1144], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x1150]
mov edi, ecx
lea ecx, [ebp - 0xc0]
mov dword [ebp - 0x58], edi
mov dword [edi + 4], 1
call fcn.00465520
xor ebx, ebx
cmp dword [edi], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
je 0x4080c1
push 0x4b9da4
push str.Skin
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
jne 0x408147
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.004019d9
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1144]
xor ecx, ebp
call fcn.004471af
add ebp, 0x1148
leave
ret 4
lea eax, [edi + 0x10]
push eax
lea eax, [ebp + 0x618]
push str._sSkinSkin.xml
push eax
call fcn.004479ae
add esp, 0xc
lea eax, [ebp + 0x618]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40808b
lea eax, [ebp + 0xa28]
push eax
lea eax, [ebp + 0x618]
push eax
call fcn.0040a886
pop ecx
pop ecx
push ebx
lea eax, [ebp + 0xa28]
push eax
lea ecx, [ebp - 0xc0]
call fcn.00466310
test al, al
je 0x408070
mov dword [edi + 4], ebx
push str.TheSkin
lea ecx, [ebp - 0xc0]
call fcn.00464a80
cmp eax, ebx
jne 0x408198
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.004019d9
mov eax, ebx
jmp 0x40809c
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea edi, [esi + 1]
push edi
call fcn.0042c376
push edi
push ebx
push eax
mov dword [ebp - 0x10], eax
call fcn.00447440
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call fcn.00447300
add esp, 0x1c
push ebx
push ebx
push dword [ebp - 0x10]
lea ecx, [ebp - 0xc0]
call fcn.004677e0
jmp 0x40811d
mov ecx, eax
call fcn.00464b20
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x24], esi
je 0x408702
jmp 0x4081b1
mov esi, dword [ebp - 0x24]
push 0x14
call fcn.0042c34b
pop ecx
cmp eax, ebx
je 0x4081ce
mov dword [eax], method.VectorParameter_class_MapParameter_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____.virtual_0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x4081d0
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0xd34]
add eax, 8
push ecx
push eax
mov byte [ebp - 4], bl
call fcn.0040a8b4
push 0x14
call fcn.0042c34b
add esp, 0xc
cmp eax, ebx
je 0x408208
mov dword [eax], vtable.VectorParameter_class_MapParameter_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____.0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x40820a
xor eax, eax
push 8
mov byte [ebp - 4], bl
mov dword [ebp - 0x4c], eax
call fcn.0042c34b
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov byte [ebp - 4], 3
je 0x40822c
mov ecx, eax
call fcn.0040279e
jmp 0x40822e
xor eax, eax
mov dword [ebp - 0x54], eax
lea eax, [esi + 0x2c]
mov edi, dword [eax + 0x20]
cmp edi, eax
mov byte [ebp - 4], bl
je 0x4082dd
cmp edi, ebx
je 0x4082dd
mov eax, dword [edi + 0x14]
mov esi, dword [edi + 0x18]
add eax, 8
add esi, 8
cmp eax, ebx
je 0x4082c9
cmp esi, ebx
je 0x4082c9
lea ecx, [ebp + 0xb2c]
push ecx
push eax
call fcn.0040a8b4
lea eax, [ebp + 0xf3c]
push eax
push esi
call fcn.0040a8b4
add esp, 0x10
lea eax, [ebp + 0xf3c]
push eax
lea ecx, [ebp - 0x40]
call fcn.004021c0
lea eax, [ebp + 0xb2c]
push eax
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call fcn.004021c0
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
lea edx, [ebp - 0x40]
push edx
lea edx, [ebp - 0x74]
push edx
mov byte [ebp - 4], 5
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x74]
call fcn.00401b15
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, edi
call fcn.00464d10
mov edi, eax
cmp edi, ebx
jne 0x40824a
mov esi, dword [ebp - 0x24]
mov edi, str.OurSelf
push edi
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx]
lea edx, [ebp - 0x54]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 6
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
push edi
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
lea edx, [ebp - 0x4c]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 7
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
lea eax, [ebp + 0xd34]
push str.SkinConfigure
push eax
call fcn.004472c8
test eax, eax
pop ecx
pop ecx
mov ecx, esi
jne 0x4084cf
call fcn.00464b20
jmp 0x4084bf
mov esi, dword [ebp - 0x14]
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0x820]
add eax, 8
push ecx
push eax
call fcn.0040a8b4
push 0x14
call fcn.0042c34b
add esp, 0xc
cmp eax, ebx
je 0x408392
mov dword [eax], vtable.VectorParameter_class_MapParameter_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____.0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x408394
xor eax, eax
push 8
mov byte [ebp - 4], bl
mov dword [ebp - 0x50], eax
call fcn.0042c34b
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov byte [ebp - 4], 9
je 0x4083b6
mov ecx, eax
call fcn.0040279e
jmp 0x4083b8
xor eax, eax
mov ecx, esi
mov byte [ebp - 4], bl
mov dword [ebp - 0x44], eax
call fcn.00464b20
jmp 0x408453
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0x410]
add eax, 8
push ecx
push eax
call fcn.0040a8b4
pop ecx
pop ecx
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
je 0x40844c
mov eax, dword [ecx]
call dword [eax + 0x30]
cmp eax, ebx
je 0x40844c
mov eax, dword [eax + 0x20]
lea ecx, [ebp]
add eax, 8
push ecx
push eax
call fcn.0040a8b4
pop ecx
pop ecx
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x74]
call fcn.004021c0
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call fcn.004021c0
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx]
lea edx, [ebp - 0x74]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0xb
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
call fcn.00401b15
push ebx
push 1
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, esi
call fcn.00464b90
mov esi, eax
cmp esi, ebx
jne 0x4083ca
push edi
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x50]
mov eax, dword [ecx]
lea edx, [ebp - 0x44]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0xc
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
lea eax, [ebp + 0x820]
push eax
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
lea edx, [ebp - 0x50]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0xd
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, dword [ebp - 0x14]
call fcn.00464b90
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x40835d
jmp 0x40869a
call fcn.00464b20
jmp 0x40868f
push 0x14
call fcn.0042c34b
pop ecx
cmp eax, ebx
je 0x4084f6
mov dword [eax], vtable.VectorParameter_class_MapParameter_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t____class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____.0
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x4084f8
xor eax, eax
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0x820]
add eax, 8
push ecx
push eax
mov byte [ebp - 4], bl
call fcn.0040a8b4
pop ecx
pop ecx
mov ecx, esi
call fcn.00464b20
jmp 0x40864c
push 8
call fcn.0042c34b
pop ecx
mov dword [ebp - 0x78], eax
cmp eax, ebx
mov byte [ebp - 4], 0xf
je 0x40853e
mov ecx, eax
call fcn.0040279e
jmp 0x408540
xor eax, eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x20]
mov esi, dword [eax + 0x4c]
add eax, 0x2c
cmp esi, eax
mov byte [ebp - 4], bl
je 0x408614
jmp 0x40860c
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x18]
lea ecx, [ebp + 0xb2c]
add eax, 8
push ecx
push eax
add edi, 8
call fcn.0040a8b4
lea eax, [ebp + 0xf3c]
push eax
push edi
call fcn.0040a8b4
lea eax, [ebp + 0xb2c]
push 0x4b9d60
push eax
call fcn.004472c8
add esp, 0x18
test eax, eax
jne 0x4085b5
lea eax, [ebp + 0xf3c]
push eax
lea eax, [ebp + 0x208]
push 0x4b9e74
push eax
call fcn.004479ae
add esp, 0xc
lea eax, [ebp + 0xf3c]
push eax
lea ecx, [ebp - 0x74]
call fcn.004021c0
lea eax, [ebp + 0xb2c]
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x10
call fcn.004021c0
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx]
lea edx, [ebp - 0x74]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0x11
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
call fcn.00401b15
push ebx
push 1
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, esi
call fcn.00464d10
mov esi, eax
cmp esi, ebx
jne 0x40855c
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
lea edx, [ebp - 0x48]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0x12
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, dword [ebp - 0x20]
call fcn.00464b90
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x408522
lea eax, [ebp + 0x820]
push eax
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0x13
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
mov ecx, dword [ebp - 0x14]
call fcn.00464b90
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x4084d9
lea eax, [ebp + 0xd34]
push eax
lea ecx, [ebp - 0x40]
call fcn.004021c0
mov esi, dword [ebp - 0x58]
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x40]
push edx
mov byte [ebp - 4], 0x14
call dword [eax]
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401b15
push dword [ebp - 0x1c]
lea eax, [ebp + 0xd34]
push eax
mov ecx, esi
call fcn.00407c39
push dword [ebp - 0x1c]
lea eax, [ebp + 0xd34]
push eax
mov ecx, esi
call fcn.00406090
mov ecx, dword [ebp - 0x24]
call fcn.00464b90
cmp eax, ebx
mov dword [ebp - 0x24], eax
jne 0x4081ae
cmp dword [ebp - 0x10], ebx
je 0x408710
push dword [ebp - 0x10]
call fcn.0042c37b
pop ecx
xor ebx, ebx
inc ebx
jmp 0x408131