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

Disassembly:
push ebp
lea ebp, [esp - 0x1148]
mov eax, 0x1148
call fcn.00450330
push 0xffffffffffffffff
push 0x536cc3
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x59d680]
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.00430da0
xor ebx, ebx
cmp dword [edi], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
je 0x409917
push 0x53de04
push str.Skin
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
jne 0x40999d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00401219
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.0044fa75
add ebp, 0x1148
leave
ret 4
lea eax, [edi + 0x10]
push eax
lea eax, [ebp + 0x618]
push str._sSkinSkin.xml
push eax
call fcn.0045025e
add esp, 0xc
lea eax, [ebp + 0x618]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4098e1
lea eax, [ebp + 0xa28]
push eax
lea eax, [ebp + 0x618]
push eax
call fcn.0040cfd3
pop ecx
pop ecx
push ebx
lea eax, [ebp + 0xa28]
push eax
lea ecx, [ebp - 0xc0]
call fcn.00431b90
test al, al
je 0x4098c6
mov dword [edi + 4], ebx
push str.TheSkin
lea ecx, [ebp - 0xc0]
call fcn.00430300
cmp eax, ebx
jne 0x4099ee
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.00401219
mov eax, ebx
jmp 0x4098f2
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.00434345
push edi
push ebx
push eax
mov dword [ebp - 0x10], eax
call fcn.0044fd00
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call fcn.0044fbc0
add esp, 0x1c
push ebx
push ebx
push dword [ebp - 0x10]
lea ecx, [ebp - 0xc0]
call fcn.00433050
jmp 0x409973
mov ecx, eax
call fcn.004303a0
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x24], esi
je 0x409f58
jmp 0x409a07
mov esi, dword [ebp - 0x24]
push 0x14
call fcn.00434315
pop ecx
cmp eax, ebx
je 0x409a24
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 0x409a26
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.0040d001
push 0x14
call fcn.00434315
add esp, 0xc
cmp eax, ebx
je 0x409a5e
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 0x409a60
xor eax, eax
push 8
mov byte [ebp - 4], bl
mov dword [ebp - 0x4c], eax
call fcn.00434315
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov byte [ebp - 4], 3
je 0x409a82
mov ecx, eax
call fcn.00402023
jmp 0x409a84
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 0x409b33
cmp edi, ebx
je 0x409b33
mov eax, dword [edi + 0x14]
mov esi, dword [edi + 0x18]
add eax, 8
add esi, 8
cmp eax, ebx
je 0x409b1f
cmp esi, ebx
je 0x409b1f
lea ecx, [ebp + 0xb2c]
push ecx
push eax
call fcn.0040d001
lea eax, [ebp + 0xf3c]
push eax
push esi
call fcn.0040d001
add esp, 0x10
lea eax, [ebp + 0xf3c]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401a45
lea eax, [ebp + 0xb2c]
push eax
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call fcn.00401a45
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.00401376
push ebx
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], bl
call fcn.00401376
mov ecx, edi
call fcn.00430590
mov edi, eax
cmp edi, ebx
jne 0x409aa0
mov esi, dword [ebp - 0x24]
mov edi, str.OurSelf
push edi
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
push edi
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
lea eax, [ebp + 0xd34]
push str.SkinConfigure
push eax
call fcn.0044fb8e
test eax, eax
pop ecx
pop ecx
mov ecx, esi
jne 0x409d25
call fcn.004303a0
jmp 0x409d15
mov esi, dword [ebp - 0x14]
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0x820]
add eax, 8
push ecx
push eax
call fcn.0040d001
push 0x14
call fcn.00434315
add esp, 0xc
cmp eax, ebx
je 0x409be8
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 0x409bea
xor eax, eax
push 8
mov byte [ebp - 4], bl
mov dword [ebp - 0x50], eax
call fcn.00434315
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov byte [ebp - 4], 9
je 0x409c0c
mov ecx, eax
call fcn.00402023
jmp 0x409c0e
xor eax, eax
mov ecx, esi
mov byte [ebp - 4], bl
mov dword [ebp - 0x44], eax
call fcn.004303a0
jmp 0x409ca9
mov eax, dword [esi + 0x20]
lea ecx, [ebp + 0x410]
add eax, 8
push ecx
push eax
call fcn.0040d001
pop ecx
pop ecx
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
je 0x409ca2
mov eax, dword [ecx]
call dword [eax + 0x30]
cmp eax, ebx
je 0x409ca2
mov eax, dword [eax + 0x20]
lea ecx, [ebp]
add eax, 8
push ecx
push eax
call fcn.0040d001
pop ecx
pop ecx
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x74]
call fcn.00401a45
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call fcn.00401a45
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.00401376
push ebx
push 1
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], bl
call fcn.00401376
mov ecx, esi
call fcn.00430410
mov esi, eax
cmp esi, ebx
jne 0x409c20
push edi
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
lea eax, [ebp + 0x820]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
mov ecx, dword [ebp - 0x14]
call fcn.00430410
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x409bb3
jmp 0x409ef0
call fcn.004303a0
jmp 0x409ee5
push 0x14
call fcn.00434315
pop ecx
cmp eax, ebx
je 0x409d4c
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 0x409d4e
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.0040d001
pop ecx
pop ecx
mov ecx, esi
call fcn.004303a0
jmp 0x409ea2
push 8
call fcn.00434315
pop ecx
mov dword [ebp - 0x78], eax
cmp eax, ebx
mov byte [ebp - 4], 0xf
je 0x409d94
mov ecx, eax
call fcn.00402023
jmp 0x409d96
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 0x409e6a
jmp 0x409e62
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.0040d001
lea eax, [ebp + 0xf3c]
push eax
push edi
call fcn.0040d001
lea eax, [ebp + 0xb2c]
push 0x53ddc0
push eax
call fcn.0044fb8e
add esp, 0x18
test eax, eax
jne 0x409e0b
lea eax, [ebp + 0xf3c]
push eax
lea eax, [ebp + 0x208]
push 0x53dedc
push eax
call fcn.0045025e
add esp, 0xc
lea eax, [ebp + 0xf3c]
push eax
lea ecx, [ebp - 0x74]
call fcn.00401a45
lea eax, [ebp + 0xb2c]
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x10
call fcn.00401a45
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.00401376
push ebx
push 1
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], bl
call fcn.00401376
mov ecx, esi
call fcn.00430590
mov esi, eax
cmp esi, ebx
jne 0x409db2
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
mov ecx, dword [ebp - 0x20]
call fcn.00430410
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x409d78
lea eax, [ebp + 0x820]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
mov ecx, dword [ebp - 0x14]
call fcn.00430410
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x409d2f
lea eax, [ebp + 0xd34]
push eax
lea ecx, [ebp - 0x40]
call fcn.00401a45
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.00401376
push dword [ebp - 0x1c]
lea eax, [ebp + 0xd34]
push eax
mov ecx, esi
call fcn.00408d5e
push dword [ebp - 0x1c]
lea eax, [ebp + 0xd34]
push eax
mov ecx, esi
call fcn.00407695
mov ecx, dword [ebp - 0x24]
call fcn.00430410
cmp eax, ebx
mov dword [ebp - 0x24], eax
jne 0x409a04
cmp dword [ebp - 0x10], ebx
je 0x409f66
push dword [ebp - 0x10]
call fcn.00434340
pop ecx
xor ebx, ebx
inc ebx
jmp 0x409987