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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push 0xd8
call fcn.10004d70
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x100c898b
push 0xd8
push 0x1013e490
call fcn.10004d30
add esp, 8
xor eax, eax
jmp 0x100c8fd5
push 0xd8
push 0
mov eax, dword [ebp - 0x10]
push eax
call fcn.100f1b90
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ecx + 0x60], eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx], 0x6c
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14], 0
je 0x100c8a32
push 0x10
call fcn.10004d70
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x14], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x14], 0
jne 0x100c8a00
push 0x1013e4b8
call fcn.10004d30
add esp, 4
xor eax, eax
jmp 0x100c8fd5
mov dword [ebp - 0xc], 0
jmp 0x100c8a12
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 4
jge 0x100c8a32
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0xc]
mov edx, dword [edx + esi*4]
mov dword [ecx + eax*4], edx
jmp 0x100c8a09
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0
je 0x100c8a9a
push 0x10
call fcn.10004d70
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x18], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x18], 0
jne 0x100c8a68
push str.Malloc_error_in_tile_to_image_function_n
call fcn.10004d30
add esp, 4
xor eax, eax
jmp 0x100c8fd5
mov dword [ebp - 0xc], 0
jmp 0x100c8a7a
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 4
jge 0x100c8a9a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x18]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0xc]
mov edx, dword [edx + esi*4]
mov dword [ecx + eax*4], edx
jmp 0x100c8a71
mov eax, dword [ebp + 8]
cmp dword [eax + 0xb0], 0
je 0x100c8b07
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xb0]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + 0x1c]
mov dword [eax + 0x88], ecx
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x88], 1
jne 0x100c8b07
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb0]
add ecx, 0x20
mov edx, dword [ebp - 0x10]
add edx, 0x90
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xb0]
mov ecx, dword [ebp - 0x10]
mov edx, dword [eax + 0x30]
mov dword [ecx + 0x8c], edx
mov eax, dword [ebp + 8]
movsx eax, word [eax + 0x60]
sub eax, 1
mov ecx, dword [ebp + 8]
movsx ecx, word [ecx + 0x74]
cdq
idiv ecx
mov dword [ebp - 8], edx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x60]
sub eax, 1
mov ecx, dword [ebp + 8]
movsx ecx, word [ecx + 0x74]
cdq
idiv ecx
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x24]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x64], eax
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x5c], eax
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x26]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x6c], eax
mov edx, dword [ebp + 8]
fld dword [0x10100348]
fdiv dword [edx + 0x80]
fstp dword [ebp - 0x18]
mov eax, dword [ebp + 8]
fld dword [0x10100348]
fdiv dword [eax + 0x84]
fstp dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x6c]
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 3
ja case.default.0x100c8b96
mov eax, dword [ebp - 0x1c]
jmp dword [eax*4 + 0x100c8fda]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x28], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x2c], 0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x30], 0
mov edx, dword [ebp + 8]
cmp dword [edx + 0x70], 0
jne 0x100c8bce
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x34], ecx
jmp 0x100c8bd9
fld dword [ebp - 0x14]
fchs
mov edx, dword [ebp - 0x10]
fstp dword [edx + 0x34]
jmp case.default.0x100c8b96
fld dword [ebp - 0x18]
fchs
mov eax, dword [ebp - 0x10]
fstp dword [eax + 0x28]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x2c], 0
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x30], 0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x70], 0
jne 0x100c8c13
fld dword [ebp - 0x14]
fchs
mov ecx, dword [ebp - 0x10]
fstp dword [ecx + 0x34]
jmp 0x100c8c1c
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x34], eax
jmp case.default.0x100c8b96
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x28], 0
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x2e]
cmp eax, 1
jne 0x100c8c44
fld dword [ebp - 0x18]
fchs
mov ecx, dword [ebp - 0x10]
fstp dword [ecx + 0x2c]
jmp 0x100c8c4d
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x2c], eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x34], 0
mov edx, dword [ebp + 8]
cmp dword [edx + 0x70], 0
jne 0x100c8c84
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x2e]
cmp ecx, 1
jne 0x100c8c77
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x30], eax
jmp 0x100c8c82
fld dword [ebp - 0x14]
fchs
mov ecx, dword [ebp - 0x10]
fstp dword [ecx + 0x30]
jmp 0x100c8ca6
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x2e]
cmp eax, 1
jne 0x100c8c9d
fld dword [ebp - 0x14]
fchs
mov ecx, dword [ebp - 0x10]
fstp dword [ecx + 0x30]
jmp 0x100c8ca6
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x30], eax
jmp case.default.0x100c8b96
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x28], 0
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x2e]
cmp eax, 1
jne 0x100c8ccc
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x2c], edx
jmp 0x100c8cd7
fld dword [ebp - 0x18]
fchs
mov eax, dword [ebp - 0x10]
fstp dword [eax + 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x34], 0
mov edx, dword [ebp + 8]
cmp dword [edx + 0x70], 0
jne 0x100c8d0e
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x2e]
cmp ecx, 1
jne 0x100c8d03
fld dword [ebp - 0x14]
fchs
mov edx, dword [ebp - 0x10]
fstp dword [edx + 0x30]
jmp 0x100c8d0c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0x30], ecx
jmp case.default.0x100c8b96
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x2e]
cmp eax, 1
jne 0x100c8d25
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0x30], edx
jmp case.default.0x100c8b96
fld dword [ebp - 0x14]
fchs
mov eax, dword [ebp - 0x10]
fstp dword [eax + 0x30]
fild dword [ebp - 8]
mov ecx, dword [ebp + 8]
fimul dword [ecx + 0x78]
mov edx, dword [ebp + 8]
fisub dword [edx + 0x88]
mov eax, dword [ebp - 0x10]
fmul dword [eax + 0x28]
mov ecx, dword [ebp + 8]
fadd dword [ecx + 0x64]
fild dword [ebp - 4]
mov edx, dword [ebp + 8]
fimul dword [edx + 0x7c]
mov eax, dword [ebp + 8]
fisub dword [eax + 0x8c]
mov ecx, dword [ebp - 0x10]
fmul dword [ecx + 0x30]
faddp st(1)
mov edx, dword [ebp - 0x10]
fstp dword [edx + 0x20]
fild dword [ebp - 4]
mov eax, dword [ebp + 8]
fimul dword [eax + 0x7c]
mov ecx, dword [ebp + 8]
fisub dword [ecx + 0x8c]
mov edx, dword [ebp - 0x10]
fmul dword [edx + 0x34]
mov eax, dword [ebp + 8]
fadd dword [eax + 0x68]
fild dword [ebp - 8]
mov ecx, dword [ebp + 8]
fimul dword [ecx + 0x78]
mov edx, dword [ebp + 8]
fisub dword [edx + 0x88]
mov eax, dword [ebp - 0x10]
fmul dword [eax + 0x2c]
faddp st(1)
mov ecx, dword [ebp - 0x10]
fstp dword [ecx + 0x24]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x78]
mov dword [edx + 0x38], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x7c]
mov dword [edx + 0x3c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 8]
imul eax, dword [edx + 0x78]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x88]
sub edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x40], edx
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x40], 0
jge 0x100c8df2
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x40], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
imul ecx, dword [eax + 0x7c]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x8c]
sub eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x44], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x44], 0
jge 0x100c8e20
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x44], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x90]
mov eax, dword [ebp + 8]
add edx, dword [eax + 0x88]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
imul eax, dword [ecx + 0x78]
sub edx, eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x48], edx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x48]
cmp ecx, dword [eax + 0x78]
jle 0x100c8e5e
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x78]
mov dword [edx + 0x48], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x94]
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x8c]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
imul ecx, dword [edx + 0x7c]
sub eax, ecx
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x4c], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x4c]
cmp edx, dword [ecx + 0x7c]
jle 0x100c8e9c
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x7c]
mov dword [eax + 0x4c], edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x28]
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x50], ecx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x2a]
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x54], ecx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x2a]
cmp ecx, 8
jne 0x100c8ed1
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x80], 0xff
jmp 0x100c8ede
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x80], 0xffff
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0x50]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xa0], edx
mov ecx, dword [ebp + 8]
add ecx, 0x30
mov edx, dword [ebp - 0x10]
add edx, 0xa4
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ecx + 8]
mov dword [edx + 8], eax
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xa0]
mov dword [edx + 0xac], ecx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x52]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xb4], eax
mov edx, dword [ebp + 8]
add edx, 0x40
mov eax, dword [ebp - 0x10]
add eax, 0xb8
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xb4]
mov dword [eax + 0xc0], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xac]
mov dword [eax + 0xd4], edx
cmp dword [ebp + 0xc], 5
jne 0x100c8fd2
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x9c]
mov dword [eax + 0x70], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x5c]
mov dword [eax + 0x74], edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0xa0]
mov edx, dword [ebp - 0x10]
mov dword [edx + 0xc8], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x98]
mov dword [eax + 0x78], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xa4]
mov dword [eax + 0xcc], edx
mov eax, dword [ebp - 0x10]
pop esi
mov esp, ebp
pop ebp
ret