Function at 0x437ef0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
push edi
call fcn.00445460
lea eax, [edi - 2]
add esp, 8
cmp eax, 2
ja 0x43843e
push 0x104
push dword [esi + 4]
lea eax, [ebp - 0x118]
push eax
call fcn.00443470
push 0x104
lea eax, [ebp - 0x118]
push str..mks
push eax
call fcn.00442d70
add esp, 0x18
cmp edi, 4
jge 0x437f82
push 0x104
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00443160
push 0x104
lea eax, [ebp - 0x21c]
push str..tga
push eax
call fcn.00442ea0
add esp, 0x18
lea eax, [ebp - 0x21c]
jmp 0x437f85
mov eax, dword [esi + 0xc]
mov dword [ebp - 8], eax
cmp edi, 3
jge 0x437fc9
push 0x104
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00443160
push 0x104
lea eax, [ebp - 0x320]
push str..sht
push eax
call fcn.00442ea0
lea edi, [ebp - 0x320]
add esp, 0x18
mov dword [ebp - 0x14], edi
jmp 0x437fcf
mov eax, dword [esi + 8]
mov dword [ebp - 0x14], eax
push ebx
push 0
push 0
push str.reading_text_file
call dword [sym.imp.tier0.dll_ReportProgress]
lea eax, [ebp - 0x118]
push eax
call fcn.00437520
add esp, 0x10
mov edx, 0x40000000
or ebx, 0xffffffff
mov dword [ebp - 0x10], edx
mov dword [ebp + 8], ebx
mov esi, 0x800
mov dword [ebp - 0xc], edx
mov eax, dword [0x4aa008]
dec eax
je 0x43801c
dec eax
jne 0x4380a7
push esi
push eax
call fcn.00437080
jmp 0x438024
push esi
push 0
call fcn.00436d80
add esp, 8
test al, al
je 0x4380a4
mov edx, dword [0x4abfac]
mov eax, edx
mov ecx, dword [0x4abfa8]
imul eax, ecx
push eax
push edx
push ecx
push str.Packing_option:__dx_d___d_pixels__n
call fcn.00446d6d
mov ebx, dword [0x4abfac]
add esp, 0x10
mov eax, dword [0x4abfa8]
mov ecx, ebx
imul ecx, eax
cmp eax, ebx
jne 0x438067
mov edi, 1
jmp 0x438077
cdq
idiv ebx
mov edi, eax
mov eax, ebx
cdq
idiv dword [0x4abfa8]
add edi, eax
mov edx, dword [ebp - 0x10]
cmp ecx, edx
jl 0x438085
jne 0x438094
cmp edi, dword [ebp - 0xc]
jge 0x438094
mov ebx, esi
mov dword [ebp - 0xc], edi
mov edx, ecx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x10], edx
jmp 0x438097
mov ebx, dword [ebp + 8]
sar esi, 1
cmp esi, 0x40
jge 0x438004
jmp 0x4380a7
mov edx, dword [ebp - 0x10]
test ebx, ebx
js 0x438453
mov eax, edx
mov dword [0x4abfa8], ebx
cdq
mov ecx, str._:_square_texture
idiv ebx
mov edx, 0x45a292
cmp ebx, eax
mov dword [0x4abfac], eax
cmovne ecx, edx
push ecx
mov ecx, eax
imul ecx, ebx
push ecx
push eax
push ebx
push str.Best_option:__dx_d___d_pixels__s_n
call fcn.00446d6d
mov eax, dword [0x4aa008]
add esp, 0x14
dec eax
je 0x4380fa
dec eax
jne 0x438106
push ebx
push dword [ebp - 8]
call fcn.00437080
jmp 0x438103
push ebx
push dword [ebp - 8]
call fcn.00436d80
add esp, 8
push 0
push 0
push str.Writing_SHT_output_file
call dword [sym.imp.tier0.dll_ReportProgress]
mov ecx, dword [0x4b7c00]
add esp, 0xc
mov ebx, dword [ebp - 0x14]
add ecx, 4
push 0
mov eax, dword [ecx]
push 0x45a294
push ebx
call dword [eax + 8]
mov esi, eax
test esi, esi
je 0x438414
mov ecx, dword [0x4b7c00]
push esi
mov eax, dword [ecx]
mov eax, dword [eax + 0x54]
call eax
test al, al
je 0x438414
mov ecx, dword [0x4b7c00]
lea edx, [ebp + 8]
add ecx, 4
mov dword [ebp + 8], 1
push esi
push 4
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4b7c00]
lea edx, [ebp + 8]
mov eax, dword [0x4abfa0]
add ecx, 4
push esi
mov dword [ebp + 8], eax
push 4
mov eax, dword [ecx]
push edx
call dword [eax + 4]
xor ebx, ebx
cmp dword [0x4abfa0], ebx
jle 0x43840a
mov ecx, dword [0x4abf94]
mov edi, edi
mov eax, dword [ecx + ebx*4]
lea edx, [ebp + 8]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [eax]
mov dword [ebp + 8], eax
mov eax, dword [ecx]
push 4
push edx
call dword [eax + 4]
mov eax, dword [0x4abf94]
lea edx, [ebp + 8]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [eax + ebx*4]
push 4
push edx
movzx eax, byte [eax + 4]
mov dword [ebp + 8], eax
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4abf94]
lea edx, [ebp + 8]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [eax + ebx*4]
push 4
push edx
mov eax, dword [eax + 0x18]
mov dword [ebp + 8], eax
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4abf94]
xor edi, edi
movss xmm1, dword [0x45a84c]
mov eax, dword [eax + ebx*4]
mov dword [ebp + 8], eax
mov edx, dword [eax + 0x18]
cmp edx, 4
jl 0x43825c
mov eax, dword [eax + 0xc]
lea ecx, [edx - 4]
shr ecx, 2
add eax, 0x24
inc ecx
lea edi, [ecx*4]
jmp 0x438240
addss xmm1, dword [eax - 0x14]
addss xmm1, dword [eax]
addss xmm1, dword [eax + 0x14]
addss xmm1, dword [eax + 0x28]
add eax, 0x50
dec ecx
jne 0x438240
mov eax, dword [ebp + 8]
cmp edi, edx
jge 0x43827a
mov eax, dword [eax + 0xc]
lea ecx, [edi + edi*4]
lea eax, [eax + ecx*4]
add eax, 0x10
sub edx, edi
mov edi, edi
addss xmm1, dword [eax]
add eax, 0x14
dec edx
jne 0x438270
mov ecx, dword [0x4b7c00]
lea edx, [ebp + 8]
add ecx, 4
movss dword [ebp + 8], xmm1
push esi
push 4
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4abf94]
mov dword [ebp - 0xc], 0
mov eax, dword [ecx + ebx*4]
cmp dword [eax + 0x18], 0
jle 0x4383fd
xor edi, edi
mov dword [ebp - 8], edi
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x10]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
movss xmm0, dword [eax + edi + 0x10]
movss dword [ebp - 0x10], xmm0
mov eax, dword [ecx]
push 4
push edx
call dword [eax + 4]
mov dword [ebp - 4], edi
mov dword [ebp + 8], 4
mov eax, dword [0x4abf94]
lea edx, [ebp - 4]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [eax + ebx*4]
push 4
push edx
mov eax, dword [eax + 0xc]
mov eax, dword [eax + edi]
fild dword [eax + 4]
fadd qword [0x45a850]
fidiv dword [0x4abfa8]
fstp dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4abf94]
lea edx, [ebp - 4]
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [eax + ebx*4]
push 4
push edx
mov eax, dword [eax + 0xc]
mov eax, dword [eax + edi]
fild dword [eax + 8]
fadd qword [0x45a850]
fidiv dword [0x4abfac]
fstp dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4abf94]
push esi
push 4
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0xc]
mov eax, dword [edi + eax]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
dec edx
mov eax, dword [ecx]
add eax, edx
mov ecx, dword [0x4b7c00]
mov dword [ebp - 4], eax
lea edx, [ebp - 4]
fild dword [ebp - 4]
add ecx, 4
push edx
fadd qword [0x45a850]
fidiv dword [0x4abfa8]
fstp dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x4abf94]
push esi
push 4
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0xc]
mov eax, dword [edi + eax]
mov ecx, dword [eax]
mov edx, dword [eax + 8]
dec edx
mov eax, dword [ecx + 4]
add eax, edx
mov ecx, dword [0x4b7c00]
mov dword [ebp - 4], eax
lea edx, [ebp - 4]
fild dword [ebp - 4]
add ecx, 4
push edx
fadd qword [0x45a850]
fidiv dword [0x4abfac]
fstp dword [ebp - 4]
mov eax, dword [ecx]
call dword [eax + 4]
dec dword [ebp + 8]
lea edi, [edi + 4]
jne 0x4382e0
mov ecx, dword [0x4abf94]
mov edx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
inc edx
add edi, 0x14
mov dword [ebp - 0xc], edx
mov eax, dword [ecx + ebx*4]
mov dword [ebp - 8], edi
cmp edx, dword [eax + 0x18]
jl 0x4382b3
inc ebx
cmp ebx, dword [0x4abfa0]
jl 0x4381a0
push dword [ebp - 0x14]
push str.Ok:_successfully_saved_SHT___s__n
jmp 0x43841a
push ebx
push str.Error:_failed_to_write_SHT___s___n
call fcn.00446d6d
add esp, 8
pop ebx
test esi, esi
je 0x43844b
mov ecx, dword [0x4b7c00]
add ecx, 4
push esi
mov eax, dword [ecx]
call dword [eax + 0xc]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push str.format_is_mksheet_sheet.mks__output.sht___output.tga__n
call fcn.00446d6d
add esp, 4
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push str.Packing_error:_failed_to_pack_images__n
call fcn.00446d6d
add esp, 4
push 1
call fcn.00446bf0
int3