Function at 0x46de50
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
mov dword [ebp - 8], eax
mov esi, ecx
push edi
movzx eax, word [ebx]
lea edx, [ebx + 0xe]
mov ecx, eax
mov edi, 0x4d42
shr ecx, 8
mov dword [ebp - 0xc], ecx
cmp ax, di
jne 0x46de98
mov edi, dword [ebx + 0xa]
mov eax, edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], edi
mov byte [ebp - 0xc], 1
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov al, byte [eax + 0xe]
mov byte [ebp + 0xb], al
jmp 0x46dede
movzx eax, word [ebx + 0xc]
mov edi, 0x12
movzx edx, word [edx]
mov dword [ebp - 0x10], eax
mov al, byte [ebx + 0x10]
mov dword [ebp - 4], edi
mov byte [ebp + 0xb], al
cmp cl, 1
jne 0x46dedb
push str.err_:_match___tga_index_color
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esi + 8]
test eax, eax
je 0x46ded0
push eax
call fcn.0047b378
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0x10]
mov dword [esi + 4], edx
imul edx, ecx
mov dword [esi], ecx
lea eax, [edx*4]
push eax
mov dword [esi + 0xc], eax
call fcn.0047f98b
push dword [esi + 0xc]
mov dword [esi + 8], eax
push 0
push eax
call fcn.00472500
mov edx, dword [esi + 8]
add esp, 0x10
test edx, edx
je 0x46ded0
mov al, byte [ebp + 0xb]
cmp al, 8
je 0x46dffd
cmp al, 0x18
je 0x46df7e
cmp al, 0x20
je 0x46df28
push str.err_:_load_memory___bloken_
jmp 0x46deba
mov ecx, dword [esi + 4]
add edi, ebx
mov eax, dword [esi]
xor ebx, ebx
lea edx, [ecx*4 - 4]
imul edx, eax
shl eax, 3
mov dword [ebp + 8], eax
add edx, dword [esi + 8]
test ecx, ecx
jle 0x46e118
nop dword [eax]
xor ecx, ecx
cmp dword [esi], ecx
jle 0x46df68
mov eax, dword [edi]
inc ecx
mov dword [edx], eax
add edi, 4
add edx, 4
cmp ecx, dword [esi]
jl 0x46df56
mov eax, dword [ebp + 8]
inc ebx
sub edx, eax
cmp ebx, dword [esi + 4]
jl 0x46df50
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 4]
mov eax, dword [esi]
lea edi, [ecx*4 - 4]
imul edi, eax
shl eax, 3
mov dword [ebp + 8], eax
xor eax, eax
mov dword [ebp - 8], eax
add edi, edx
mov edx, dword [ebp - 4]
add edx, ebx
test ecx, ecx
jle 0x46e118
mov ecx, dword [ebp + 8]
nop word [eax + eax]
xor ebx, ebx
cmp dword [esi], ebx
jle 0x46dfe4
movzx ecx, byte [edx + 2]
inc ebx
movzx eax, byte [edx + 1]
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
movzx eax, byte [edx]
shl ecx, 8
add edx, 3
or ecx, eax
mov dword [edi], ecx
add edi, 4
cmp ebx, dword [esi]
jl 0x46dfb6
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
inc eax
sub edi, ecx
mov dword [ebp - 8], eax
cmp eax, dword [esi + 4]
jl 0x46dfb0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [ebp - 0xc], 1
mov ecx, dword [esi]
jne 0x46e0bd
and ecx, reloc.WS2_32.dll_closesocket
jns 0x46e016
dec ecx
or ecx, 0xfffffffc
inc ecx
mov eax, 4
sub eax, ecx
neg ecx
sbb ecx, ecx
add ebx, dword [ebp - 4]
and ecx, eax
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi]
lea edi, [eax*4 - 4]
imul edi, ecx
shl ecx, 3
mov dword [ebp - 4], ecx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
add edi, edx
test eax, eax
jle 0x46e118
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
cmp dword [esi], 0
mov dword [ebp + 8], 0
jle 0x46e0a2
nop
movzx ecx, byte [ebx]
inc ebx
mov eax, dword [ebp - 8]
movzx edx, byte [eax + ecx*4 + 0x2a]
movzx eax, byte [eax + ecx*4 + 0x29]
or edx, 0xffffff00
shl edx, 8
or edx, eax
mov eax, dword [ebp - 8]
shl edx, 8
movzx eax, byte [eax + ecx*4 + 0x28]
or edx, eax
mov eax, dword [ebp + 8]
mov dword [edi], edx
inc eax
add edi, 4
mov dword [ebp + 8], eax
cmp eax, dword [esi]
jl 0x46e060
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
inc ecx
sub edi, edx
add ebx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, dword [esi + 4]
jl 0x46e053
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 4]
add ebx, edi
lea edx, [eax*4 - 4]
imul edx, ecx
shl ecx, 3
mov dword [ebp + 8], ecx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
add edx, dword [esi + 8]
test eax, eax
jle 0x46e118
mov eax, dword [ebp + 8]
xor edi, edi
cmp dword [esi], edi
jle 0x46e10d
movzx eax, byte [ebx]
inc edi
mov ecx, eax
inc ebx
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, eax
mov dword [edx], ecx
add edx, 4
cmp edi, dword [esi]
jl 0x46e0e7
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
inc ecx
sub edx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, dword [esi + 4]
jl 0x46e0e1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8