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

Disassembly:
push 0xffffffffffffffff
push 0x4ed401
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2e4
mov eax, dword [0x50a0e0]
push esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], eax
add ecx, 0x48
lea edx, [esp + 0x24]
mov dword [esp + 0x50], ecx
xor esi, esi
mov ecx, dword [ecx]
mov dword [esp + 0x2f0], esi
push ecx
push str._s.xml
push edx
call fcn.004073f0
mov ecx, dword [esp + 0x30]
add esp, 0xc
lea eax, [esp + 0x98]
push eax
push ecx
call dword [0x4f92e0]
cmp eax, 0xffffffff
mov dword [esp + 0x64], eax
jne 0x40c826
mov eax, dword [esp + 0x24]
mov ecx, dword [0x50a0e4]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40d06f
add eax, 0xfffffff4
push eax
call dword [0x4f9320]
test eax, eax
jg 0x40d06f
mov eax, dword [esp + 0x24]
add eax, 0xfffffff4
push eax
call fcn.004dcaa6
add esp, 4
jmp 0x40d06f
mov ecx, dword [0x50a0e0]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x40]
call fcn.004272c0
lea edx, [esp + 0xc]
lea ecx, [esp + 0x3c]
push edx
mov byte [esp + 0x2f4], 1
call fcn.00409130
test eax, eax
jne 0x40c879
mov eax, dword [0x4f96b0]
mov ecx, dword [0x4f96b4]
mov edx, dword [0x4f96b8]
mov dword [esp + 0xc], eax
mov eax, dword [0x4f96bc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
push ebx
push ebp
lea ecx, [esp + 0x48]
push edi
push ecx
push 0x4fa674
push 3
lea edx, [esp + 0x24]
push esi
push edx
call dword [0x4f9688]
mov dword [esp + 0x50], eax
mov eax, dword [0x50a0e0]
mov dword [esp + 0x58], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], eax
mov byte [esp + 0x2fc], 2
xor ebp, ebp
test byte [esp + 0xa4], 0x10
jne 0x40ceb0
mov ecx, dword [0x50a0e0]
lea edx, [esp + 0xd0]
test edx, edx
mov dword [esp + 0x14], ecx
je 0x40c938
lea eax, [esp + 0xd0]
shr eax, 0x10
jne 0x40c8fa
xor eax, eax
lea ecx, [esp + 0xd0]
mov ax, cx
lea ecx, [esp + 0x14]
push eax
call fcn.00407b70
jmp 0x40c938
lea edx, [esp + 0xd0]
push edx
call dword [0x4f9318]
mov esi, eax
cmp esi, ebp
je 0x40c938
push esi
lea ecx, [esp + 0x18]
call fcn.00402090
test eax, eax
je 0x40c938
mov edi, dword [esp + 0x14]
lea ecx, [esi + esi]
mov eax, ecx
lea esi, [esp + 0xd0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0xd0]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
mov byte [esp + 0x308], 3
call fcn.00402910
mov ecx, dword [esp + 0x14]
push str.mini.xml
push ecx
call fcn.004dd2dd
add esp, 8
test eax, eax
je 0x40ce96
mov eax, dword [esp + 0x28]
xor esi, esi
mov edi, eax
mov word [esp + 0x94], bp
push eax
lea ecx, [esp + 0x78]
mov word [esp + 0x78], bp
call fcn.004067a0
lea edx, [esp + 0x94]
lea eax, [esp + 0x74]
push edx
push eax
push str.load
lea ecx, [esp + 0x58]
mov byte [esp + 0x308], 6
call fcn.004067f0
test eax, eax
jl 0x40c9cb
cmp word [esp + 0x9c], 0xffff
sete al
test al, al
je 0x40c9cb
mov bl, 1
jmp 0x40c9cd
xor bl, bl
lea ecx, [esp + 0x74]
mov byte [esp + 0x2fc], 5
push ecx
call dword [0x4f936c]
test bl, bl
je 0x40c9f3
push edi
lea ecx, [esp + 0x4c]
call fcn.00406d00
mov esi, 1
lea edx, [esp + 0x94]
push edx
call dword [0x4f936c]
cmp esi, ebp
je 0x40ce96
lea ecx, [esp + 0x44]
call fcn.004272c0
lea ecx, [esp + 0x54]
xor esi, esi
call fcn.004272c0
push str.skin
lea ecx, [esp + 0x88]
mov word [esp + 0x88], bp
call fcn.004067a0
lea eax, [esp + 0x54]
lea ecx, [esp + 0x84]
push eax
push ecx
push str.selectSingleNode
lea ecx, [esp + 0x58]
mov byte [esp + 0x308], 9
call fcn.00407e00
lea edx, [esp + 0x84]
mov dword [esp + 0x50], eax
push edx
mov byte [esp + 0x300], 8
call dword [0x4f936c]
cmp dword [esp + 0x50], ebp
jl 0x40ca90
mov eax, dword [esp + 0x54]
cmp eax, ebp
je 0x40ca90
push eax
lea ecx, [esp + 0x48]
call fcn.00407de0
mov esi, 1
lea ecx, [esp + 0x54]
mov byte [esp + 0x2fc], 7
call fcn.004282a0
cmp esi, ebp
je 0x40ce85
mov ebx, dword [esp + 0x38]
mov eax, dword [ebx + 0x94]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.004dd2dd
add esp, 8
test eax, eax
jne 0x40cacd
mov dword [esp + 0x34], 1
mov esi, dword [esp + 0x58]
cmp esi, ebp
jne 0x40cb0a
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
je 0x40cb0a
cmp dword [eax - 0xc], ebp
jge 0x40caf3
mov edx, dword [0x50a0e4]
add eax, 0xfffffff4
cmp eax, edx
jne 0x40cafc
cmp dword [ecx - 0xc], ebp
jge 0x40cbba
push ecx
mov ecx, dword [ecx - 8]
push ecx
lea ecx, [esp + 0x34]
call fcn.00402200
mov edi, dword [0x4f9310]
mov eax, dword [0x50a0e0]
inc esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea edx, [esp + 0x10]
inc esi
push 0x50b500
push edx
lea ecx, [esp + 0x48]
mov byte [esp + 0x304], 0xa
mov dword [esp + 0x60], esi
call fcn.004083f0
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x2fc], 0xb
mov eax, dword [ecx - 8]
cmp eax, ebp
jne 0x40ccb0
mov eax, dword [0x50a0e0]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x28]
push esi
push str.unknow
push ecx
lea edx, [esp + 0x48]
push 0x50b4e4
push edx
mov byte [esp + 0x310], 0xc
call fcn.004073f0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x50]
add esp, 0x14
cmp eax, ecx
je 0x40cbf3
cmp dword [eax - 0xc], ebp
jge 0x40cba5
mov edx, dword [0x50a0e4]
add eax, 0xfffffff4
cmp eax, edx
jne 0x40cbaa
cmp dword [ecx - 0xc], ebp
jge 0x40cbdc
mov eax, dword [ecx - 8]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00402200
jmp 0x40cbf3
lea ecx, [esp + 0x2c]
call fcn.004020f0
mov eax, dword [esp + 0x14]
mov edi, dword [0x4f9310]
mov dword [esp + 0x2c], eax
add eax, 0xfffffff4
push eax
call edi
jmp 0x40cb10
lea ecx, [esp + 0x1c]
call fcn.004020f0
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
add eax, 0xfffffff4
push eax
call edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
je 0x40cc3d
cmp dword [eax - 0xc], ebp
jge 0x40cc11
mov edx, dword [0x50a0e4]
add eax, 0xfffffff4
cmp eax, edx
jne 0x40cc16
cmp dword [ecx - 0xc], ebp
jge 0x40cc26
push ecx
mov ecx, dword [ecx - 8]
push ecx
lea ecx, [esp + 0x20]
call fcn.00402200
jmp 0x40cc3d
lea ecx, [esp + 0x18]
call fcn.004020f0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
add eax, 0xfffffff4
push eax
call edi
lea edx, [esp + 0xd0]
test edx, edx
jne 0x40cc4c
xor eax, eax
jmp 0x40cc5a
lea eax, [esp + 0xd0]
push eax
call dword [0x4f9318]
lea ecx, [esp + 0xd0]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00402200
mov eax, dword [esp + 0x3c]
mov ecx, dword [0x50a0e4]
mov byte [esp + 0x2fc], 0xb
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40cd6c
add eax, 0xfffffff4
push eax
call dword [0x4f9320]
test eax, eax
jg 0x40cd6c
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff4
push eax
call fcn.004dcaa6
add esp, 4
jmp 0x40cd6c
mov edx, dword [esp + 0x1c]
cmp edx, ecx
je 0x40ccf3
cmp dword [edx - 0xc], ebp
jge 0x40ccca
mov esi, dword [0x50a0e4]
add edx, 0xfffffff4
cmp edx, esi
jne 0x40cccf
cmp dword [ecx - 0xc], ebp
jge 0x40ccdc
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00402200
jmp 0x40ccf3
lea ecx, [esp + 0x1c]
call fcn.004020f0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
add eax, 0xfffffff4
push eax
call edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
cmp eax, ecx
je 0x40cd3d
cmp dword [eax - 0xc], ebp
jge 0x40cd11
mov edx, dword [0x50a0e4]
add eax, 0xfffffff4
cmp eax, edx
jne 0x40cd16
cmp dword [ecx - 0xc], ebp
jge 0x40cd26
push ecx
mov ecx, dword [ecx - 8]
push ecx
lea ecx, [esp + 0x20]
call fcn.00402200
jmp 0x40cd3d
lea ecx, [esp + 0x18]
call fcn.004020f0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
add eax, 0xfffffff4
push eax
call edi
lea edx, [esp + 0xd0]
test edx, edx
jne 0x40cd4c
xor eax, eax
jmp 0x40cd5a
lea eax, [esp + 0xd0]
push eax
call dword [0x4f9318]
lea ecx, [esp + 0xd0]
push ecx
push eax
lea ecx, [esp + 0x28]
call fcn.00402200
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebp
je 0x40cd93
cmp dword [eax - 0xc], ebp
jl 0x40cd85
lea ecx, [esp + 0x10]
call fcn.004020f0
jmp 0x40cd93
push 0x51d42c
lea ecx, [esp + 0x14]
call fcn.00406d00
lea edx, [esp + 0x68]
push 0x50b4d8
push edx
lea ecx, [esp + 0x48]
call fcn.004083f0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x300], 0xd
call fcn.004022b0
lea ecx, [esp + 0x68]
mov byte [esp + 0x2fc], 0xb
call fcn.004021d0
push 0x50b4d4
lea ecx, [esp + 0x64]
call fcn.0040ae80
mov ecx, dword [esp + 0x5c]
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x68]
push ecx
push edx
mov byte [esp + 0x308], 0xe
call fcn.0040d090
lea ecx, [esp + 0x60]
lea edx, [esp + 0x6c]
push ecx
push eax
push edx
mov byte [esp + 0x308], 0xf
call fcn.0040d090
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x300], 0x10
call fcn.004022b0
lea ecx, [esp + 0x6c]
call fcn.004021d0
lea ecx, [esp + 0x64]
call fcn.004021d0
lea ecx, [esp + 0x60]
mov byte [esp + 0x2fc], 0xb
call fcn.004021d0
mov eax, dword [esp + 0x10]
push eax
call dword [0x4f92e4]
cmp eax, 0xffffffff
je 0x40ce6b
test al, 0x10
je 0x40ce6b
mov eax, dword [ebx + 0x168]
lea ecx, [ebx + 0x160]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.0040dda0
lea ecx, [esp + 0x10]
call fcn.004021d0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2fc], 7
call fcn.0040d210
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], 4
call fcn.004282a0
lea ecx, [esp + 0x28]
call fcn.004021d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2fc], 2
call fcn.004021d0
mov esi, dword [esp + 0x70]
lea eax, [esp + 0xa4]
push eax
push esi
call dword [0x4f92e8]
test eax, eax
jne 0x40c8b3
push esi
call dword [0x4f92ec]
cmp dword [esp + 0x34], ebp
jne 0x40cef7
mov esi, dword [esp + 0x38]
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esi + 0x94]
call fcn.004022b0
push 1
mov ecx, esi
call fcn.0040bab0
jmp 0x40cefb
mov esi, dword [esp + 0x38]
cmp dword [esi + 0x524], ebp
jne 0x40d007
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x5c]
add edx, 0x94
lea ecx, [esp + 0x34]
push edx
push eax
push ecx
call fcn.0040d090
mov edx, dword [esp + 0x34]
mov bl, 0x11
push edx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x300], bl
call fcn.00408d10
test eax, eax
je 0x40cffe
lea ecx, [esp + 0x44]
call fcn.004272c0
lea eax, [esp + 0x40]
lea ecx, [esp + 0x48]
push eax
push str.skin
mov byte [esp + 0x304], 0x12
call fcn.00408fd0
test eax, eax
je 0x40cfee
lea ecx, [esp + 0x18]
xor edi, edi
push ecx
xor ebp, ebp
call dword [0x4f9438]
push eax
call dword [0x4f9434]
test eax, eax
je 0x40cf9a
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
sub edi, ecx
sub ebp, eax
push str.width
lea ecx, [esp + 0x44]
call fcn.00408630
push str.height
lea ecx, [esp + 0x44]
mov esi, eax
call fcn.00408630
mov ecx, eax
mov eax, edi
sub eax, esi
mov edi, dword [esp + 0x38]
cdq
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
add eax, edx
mov dword [edi + 8], eax
add eax, esi
mov dword [edi + 0x10], eax
mov eax, ebp
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 1
add eax, edx
mov dword [edi + 0xc], eax
add eax, ecx
mov dword [edi + 0x14], eax
xor ebp, ebp
lea ecx, [esp + 0x44]
mov byte [esp + 0x2fc], bl
call fcn.004282a0
lea ecx, [esp + 0x34]
call fcn.004021d0
mov eax, dword [esp + 0x58]
pop edi
cmp eax, ebp
pop ebp
pop ebx
lea ecx, [esp + 0x20]
jle 0x40d050
call fcn.004021d0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2f0], 0
call fcn.00402a90
lea ecx, [esp + 0x24]
call fcn.004021d0
mov eax, 1
pop esi
mov ecx, dword [esp + 0x2e4]
mov dword fs:[0], ecx
add esp, 0x2f0
ret
call fcn.004021d0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2f0], 0
call fcn.00402a90
lea ecx, [esp + 0x24]
call fcn.004021d0
mov ecx, dword [esp + 0x2e8]
xor eax, eax
pop esi
mov dword fs:[0], ecx
add esp, 0x2f0
ret