Function at 0x415360
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c040
push 0x417c6a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x40], edi
cmp dword [ebp + 0xc], 0x12
jbe 0x415723
mov esi, dword [ebp + 8]
mov eax, esi
mov dword [ebp - 0x34], eax
add esi, 0x12
mov ecx, eax
mov edx, edi
mov ebx, dword [ecx]
mov dword [edx], ebx
mov ebx, dword [ecx + 4]
mov dword [edx + 4], ebx
mov ebx, dword [ecx + 8]
mov dword [edx + 8], ebx
mov ebx, dword [ecx + 0xc]
mov dword [edx + 0xc], ebx
mov cx, word [ecx + 0x10]
mov word [edx + 0x10], cx
mov cl, byte [eax + 2]
cmp cl, 2
je 0x4153d9
cmp cl, 0xa
je 0x4153d9
push str.TGA_decode___failed:_unsupported_tga_compression_type._n
jmp 0x41571a
mov cl, byte [eax + 1]
test cl, cl
jne 0x415715
mov cl, byte [eax + 0x10]
cmp cl, 0x20
je 0x4153f5
cmp cl, 0x18
jne 0x415715
movzx ebx, word [eax + 0xc]
mov dword [ebp - 0x38], ebx
movzx ecx, word [eax + 0xe]
mov dword [ebp - 0x3c], ecx
mov eax, ecx
imul eax, ebx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x415411
mov dword [edx], ebx
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x41541a
mov dword [edx], ecx
lea edx, [eax*4]
push edx
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 0x30], eax
xor edx, edx
cmp eax, edx
jne 0x41543e
push str.TGA_decode___failed:_can_not_allocate_memory_of_decoded_image_n
jmp 0x41571a
mov ecx, dword [ebp - 0x34]
mov cl, byte [ecx]
test cl, cl
je 0x41544c
movzx ecx, cl
add esi, ecx
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 0x34]
mov cl, byte [ecx + 2]
cmp cl, 2
jne 0x4154df
mov ecx, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], edx
cmp edx, dword [ebp - 0x3c]
jge 0x41568e
xor edx, edx
mov dword [ebp - 0x24], edx
cmp edx, ebx
jge 0x4154d9
mov eax, dword [ebp - 0x34]
mov al, byte [eax + 0x10]
cmp al, 0x18
jne 0x4154a9
mov al, byte [esi]
mov byte [ecx], al
inc esi
mov dword [ebp + 8], esi
mov al, byte [esi]
mov byte [ecx + 1], al
inc esi
mov dword [ebp + 8], esi
mov al, byte [esi]
mov byte [ecx + 2], al
inc esi
mov dword [ebp + 8], esi
mov byte [ecx + 3], 0xff
add ecx, 4
mov dword [ebp - 0x28], ecx
inc edx
jmp 0x415471
cmp al, 0x20
jne 0x4154d0
mov al, byte [esi]
mov byte [ecx], al
inc esi
mov dword [ebp + 8], esi
mov al, byte [esi]
mov byte [ecx + 1], al
inc esi
mov dword [ebp + 8], esi
mov al, byte [esi]
mov byte [ecx + 2], al
inc esi
mov dword [ebp + 8], esi
mov al, byte [esi]
mov byte [ecx + 3], al
inc esi
mov dword [ebp + 8], esi
add ecx, 4
mov dword [ebp - 0x28], ecx
inc edx
jmp 0x415471
mov edx, dword [ebp - 0x2c]
inc edx
jmp 0x415463
cmp cl, 0xa
jne 0x415693
mov eax, dword [ebp - 0x3c]
dec eax
mov dword [ebp - 0x2c], eax
cmp eax, edx
jl 0x415690
mov ecx, eax
imul ecx, ebx
mov edi, dword [ebp - 0x30]
lea ecx, [edi + ecx*4]
mov dword [ebp - 0x28], ecx
xor edi, edi
mov dword [ebp - 0x24], edi
jmp 0x415510
mov ebx, dword [ebp - 0x38]
nop
cmp edi, ebx
jge 0x415683
mov dl, byte [esi]
mov byte [ebp - 0x1f], dl
inc esi
mov dword [ebp + 8], esi
xor ebx, ebx
mov bl, dl
and ebx, 0x7f
inc ebx
mov byte [ebp - 0x1e], bl
test dl, dl
jns 0x4155e9
mov edx, dword [ebp - 0x34]
mov dl, byte [edx + 0x10]
cmp dl, 0x18
jne 0x415560
mov dl, byte [esi]
mov byte [ebp - 0x1c], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ebp - 0x1b], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ebp - 0x1a], dl
inc esi
mov dword [ebp + 8], esi
mov byte [ebp - 0x1d], 0xff
jmp 0x415589
cmp dl, 0x20
jne 0x415589
mov dl, byte [esi]
mov byte [ebp - 0x1c], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ebp - 0x1b], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ebp - 0x1a], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ebp - 0x1d], dl
inc esi
mov dword [ebp + 8], esi
xor dl, dl
mov byte [ebp - 0x19], dl
mov edi, edi
cmp dl, bl
jae 0x41550c
mov bl, byte [ebp - 0x1a]
mov byte [ecx + 2], bl
mov bl, byte [ebp - 0x1b]
mov byte [ecx + 1], bl
mov bl, byte [ebp - 0x1c]
mov byte [ecx], bl
mov bl, byte [ebp - 0x1d]
mov byte [ecx + 3], bl
add ecx, 4
mov dword [ebp - 0x28], ecx
inc edi
mov dword [ebp - 0x24], edi
mov ebx, dword [ebp - 0x38]
cmp edi, ebx
jne 0x4155df
xor edi, edi
mov dword [ebp - 0x24], edi
test eax, eax
jle 0x415683
dec eax
mov dword [ebp - 0x2c], eax
mov ecx, eax
imul ecx, ebx
mov ebx, dword [ebp - 0x30]
lea ecx, [ebx + ecx*4]
mov dword [ebp - 0x28], ecx
inc dl
mov byte [ebp - 0x19], dl
mov bl, byte [ebp - 0x1e]
jmp 0x415590
mov byte [ebp - 0x19], 0
lea ecx, [ecx]
cmp byte [ebp - 0x19], bl
jae 0x41550c
mov edx, dword [ebp - 0x34]
mov dl, byte [edx + 0x10]
cmp dl, 0x18
jne 0x415624
mov dl, byte [esi]
mov byte [ecx], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ecx + 1], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ecx + 2], dl
inc esi
mov dword [ebp + 8], esi
mov byte [ecx + 3], 0xff
jmp 0x41564c
cmp dl, 0x20
jne 0x41564c
mov dl, byte [esi]
mov byte [ecx], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ecx + 1], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ecx + 2], dl
inc esi
mov dword [ebp + 8], esi
mov dl, byte [esi]
mov byte [ecx + 3], dl
inc esi
mov dword [ebp + 8], esi
add ecx, 4
mov dword [ebp - 0x28], ecx
inc edi
mov dword [ebp - 0x24], edi
mov ebx, dword [ebp - 0x38]
cmp edi, ebx
jne 0x415678
xor edi, edi
mov dword [ebp - 0x24], edi
test eax, eax
jle 0x415683
dec eax
mov dword [ebp - 0x2c], eax
mov ecx, eax
imul ecx, ebx
mov edx, dword [ebp - 0x30]
lea ecx, [edx + ecx*4]
mov dword [ebp - 0x28], ecx
inc byte [ebp - 0x19]
mov bl, byte [ebp - 0x1e]
jmp 0x4155f0
dec eax
mov edi, dword [ebp - 0x40]
xor edx, edx
jmp 0x4154ec
xor edx, edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x40], eax
mov word [edi + 0x22], 0x20
mov dword [edi + 0x38], edx
mov dword [edi + 0x34], edx
mov dword [edi + 0x24], edx
movzx ecx, word [edi + 0xe]
mov dword [edi + 0x1c], ecx
movzx eax, word [edi + 0xc]
mov dword [edi + 0x18], eax
mov word [edi + 0x20], 1
mov dword [edi + 0x14], 0x28
mov dword [edi + 0x2c], edx
mov dword [edi + 0x30], edx
imul eax, ecx
shl eax, 5
mov dword [edi + 0x28], eax
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push str.TGA_decode___failed:_only_24bit_and_32bits_image_are_supported_n
call dword [sym.imp.MSVCR71.dll_printf]
add esp, 4
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10