Function at 0x40f940
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x48
push ebp
mov ebp, ecx
mov al, byte [ebp + 0x41dc]
cmp al, 8
je 0x40f977
cmp al, 0x10
je 0x40f977
cmp al, 0x20
je 0x40f977
movzx eax, al
push eax
push str.Invalid_number_of_bits_per_pixel:__d_n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop ebp
add esp, 0x48
ret 4
push esi
push edi
push 1
lea ecx, [esp + 0x12]
push ecx
mov ecx, ebp
call fcn.00404470
mov al, byte [esp + 0xe]
xor esi, esi
lea edi, [ebp + 0x528]
test al, 1
je 0x40f9be
mov cl, byte [esi + ebp + 0x608]
test cl, cl
je 0x40f9be
push edi
call fcn.0042a7c0
add esp, 4
test eax, eax
jne 0x40fa3d
mov byte [esi + ebp + 0x608], al
mov al, byte [esp + 0xe]
shr al, 1
inc esi
add edi, 0x38
cmp esi, 4
mov byte [esp + 0xe], al
jl 0x40f993
cmp al, 8
push ebx
jne 0x40fc7e
cmp byte [ebp + 0x41dd], 0x18
jne 0x40fa86
mov eax, 0xff
cmp word [ebp + 0x41e0], ax
jne 0x40fa86
cmp word [ebp + 0x41e2], ax
jne 0x40fa86
cmp word [ebp + 0x41e4], ax
jne 0x40fa86
push 3
lea edx, [esp + 0x18]
push edx
mov ecx, ebp
call fcn.00404470
movzx esi, byte [esp + 0x16]
movzx eax, byte [esp + 0x15]
movzx ecx, byte [esp + 0x14]
or esi, 0x200
shl esi, 8
or esi, eax
shl esi, 8
or esi, ecx
jmp 0x40fbab
add esi, 0x18
imul esi, esi, 0x38
mov ebp, dword [esi + ebp]
test ebp, ebp
je 0x40fa68
push ebp
push str.zlib_inflateEnd___error:__s_n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
push eax
push str.zlib_inflateEnd___error:__d_n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
movzx edx, byte [ebp + 0x41dc]
shr edx, 3
push edx
lea eax, [esp + 0x20]
push eax
mov ecx, ebp
call fcn.00404470
mov ax, word [ebp + 0x41e0]
mov dl, byte [ebp + 0x41dc]
cmp dl, 8
mov bl, byte [ebp + 0x41e6]
mov si, word [ebp + 0x41e2]
mov cl, byte [ebp + 0x41e8]
movzx eax, ax
mov dword [esp + 0x18], eax
je 0x40fb3c
cmp dl, 0x10
je 0x40fb35
mov eax, dword [esp + 0x1c]
movzx edi, word [ebp + 0x41e4]
shr eax, cl
movzx edx, si
and eax, edi
imul eax, eax, 0xff
mov dword [esp + 0x14], edx
xor edx, edx
div edi
mov edi, dword [esp + 0x1c]
mov cl, byte [ebp + 0x41e7]
xor edx, edx
movzx esi, al
mov eax, edi
shr eax, cl
mov ecx, dword [esp + 0x14]
or esi, 0x200
shl esi, 8
and eax, ecx
imul eax, eax, 0xff
div ecx
xor edx, edx
movzx ecx, al
or esi, ecx
mov cl, bl
mov eax, edi
shr eax, cl
mov ecx, dword [esp + 0x18]
and eax, ecx
imul eax, eax, 0xff
div ecx
jmp 0x40fba3
movzx edi, word [esp + 0x1c]
jmp 0x40fb41
movzx edi, byte [esp + 0x1c]
movzx edx, word [ebp + 0x41e4]
mov eax, edi
shr eax, cl
mov dword [esp + 0x1c], edx
mov cl, byte [ebp + 0x41e7]
movzx esi, si
and eax, edx
imul eax, eax, 0xff
cdq
idiv dword [esp + 0x1c]
mov dword [esp + 0x14], esi
movzx esi, al
mov eax, edi
shr eax, cl
mov ecx, dword [esp + 0x14]
or esi, 0x200
shl esi, 8
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
movzx ecx, al
or esi, ecx
mov cl, bl
mov eax, edi
shr eax, cl
mov ecx, dword [esp + 0x18]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
movzx edx, al
shl esi, 8
or esi, edx
lea ebx, [ebp + 0x1e4]
mov ecx, ebx
call fcn.004181a0
mov eax, dword [ebp + 0x3a1c]
mov ecx, dword [ebp + 0x3a20]
push eax
push ecx
mov dword [esp + 0x34], ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, dword [ebp + 0x3a20]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x3a24]
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [esp + 0x5c]
movzx ecx, word [eax]
movzx edx, word [eax + 4]
add edx, ecx
mov dword [esp + 0x48], ecx
movzx ecx, word [eax + 2]
movzx eax, word [eax + 6]
add eax, ecx
mov dword [esp + 0x4c], ecx
mov ecx, dword [ebp + 0x3a20]
push esi
push ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea edx, [esp + 0x54]
push edx
push 2
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov ecx, dword [esp + 0x38]
push 0
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, ebx
call fcn.004181b0
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
cmp al, 9
jne 0x40fcaa
mov eax, dword [esp + 0x5c]
movzx ecx, word [eax + 6]
movzx edx, word [eax + 4]
push ecx
movzx ecx, word [eax + 2]
push edx
movzx edx, word [eax]
push ecx
push edx
mov ecx, ebp
call fcn.0040f5d0
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
jb 0x40fcb6
push str.Tight_encoding:_bad_subencoding_value_received._n
jmp 0x41018e
test al, 4
je 0x40fd20
push 1
lea eax, [esp + 0x17]
push eax
mov ecx, ebp
call fcn.00404470
movzx eax, byte [esp + 0x13]
sub eax, 0
je 0x40fd10
dec eax
je 0x40fcf9
dec eax
je 0x40fce2
push str.Tight_encoding:_unknown_filter_code_received._n
jmp 0x41018e
mov ebx, dword [esp + 0x5c]
movzx ecx, word [ebx + 6]
movzx edx, word [ebx + 4]
push ecx
push edx
mov ecx, ebp
call fcn.0040f130
jmp 0x40fd35
mov ebx, dword [esp + 0x5c]
movzx eax, word [ebx + 6]
movzx ecx, word [ebx + 4]
push eax
push ecx
mov ecx, ebp
call fcn.0040f1b0
jmp 0x40fd35
mov ebx, dword [esp + 0x5c]
movzx edx, word [ebx + 6]
movzx eax, word [ebx + 4]
push edx
push eax
jmp 0x40fd2e
mov ebx, dword [esp + 0x5c]
movzx ecx, word [ebx + 6]
movzx edx, word [ebx + 4]
push ecx
push edx
mov ecx, ebp
call fcn.0040f0a0
mov edi, eax
test edi, edi
jne 0x40fd45
push str.Tight_encoding:_error_receiving_palette._n
jmp 0x41018e
movzx eax, word [ebx + 4]
imul eax, edi
add eax, 7
cdq
and edx, 7
add eax, edx
mov esi, eax
movzx eax, word [ebx + 6]
sar esi, 3
imul eax, esi
cmp eax, 0xc
mov dword [esp + 0x28], esi
mov ecx, ebp
jge 0x40feab
push eax
call fcn.004046e0
movzx eax, word [ebx + 6]
mov ecx, dword [ebp + 0x1c4]
imul eax, esi
push eax
push ecx
mov ecx, ebp
call fcn.00404470
movzx edx, word [ebx + 6]
movzx eax, word [ebx + 4]
imul edx, eax
shl edx, 2
push edx
mov ecx, ebp
call fcn.004047e0
movzx ecx, word [ebx + 6]
push ecx
mov ecx, ebp
call dword [ebp + 0x60c]
lea ecx, [ebp + 0x1e4]
mov dword [esp + 0x24], ecx
call fcn.004181a0
mov eax, dword [ebp + 0x3a1c]
mov ecx, dword [ebp + 0x3a20]
push eax
push ecx
mov dword [esp + 0x30], ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov esi, dword [ebp + 0x3a20]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x3a24]
push 0
push eax
push esi
mov dword [esp + 0x38], esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
movzx edi, word [ebx + 2]
movzx eax, word [ebx + 6]
mov edx, dword [ebp + 0x274]
add eax, edi
cmp edi, eax
mov dword [esp + 0x5c], edx
jge 0x40fe73
movzx eax, word [ebx]
movzx ecx, word [ebx + 4]
add ecx, eax
mov esi, eax
cmp esi, ecx
jge 0x40fe60
jmp 0x40fe30
mov edx, dword [esp + 0x5c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x3a20]
push eax
push edi
push esi
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ecx, dword [esp + 0x5c]
movzx eax, word [ebx]
movzx edx, word [ebx + 4]
add ecx, 4
mov dword [esp + 0x5c], ecx
inc esi
lea ecx, [edx + eax]
cmp esi, ecx
jl 0x40fe30
movzx edx, word [ebx + 6]
movzx esi, word [ebx + 2]
inc edi
add edx, esi
cmp edi, edx
jl 0x40fe20
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
push 0
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x24]
call fcn.004181b0
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
call fcn.0040de30
test eax, eax
mov dword [esp + 0x1c], eax
jg 0x40fec2
push str.Tight_encoding:_bad_data_received_from_server._n
jmp 0x41018e
xor eax, eax
mov al, byte [esp + 0x12]
and eax, 3
mov ecx, eax
imul ecx, ecx, 0x38
lea esi, [ecx + ebp + 0x528]
mov cl, byte [eax + ebp + 0x608]
test cl, cl
mov dword [esp + 0x5c], eax
mov dword [esp + 0x20], esi
jne 0x40ff5a
push 0x38
xor eax, eax
push str.1.1.4
push esi
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
call fcn.0042a910
add esp, 0xc
test eax, eax
je 0x40ff4e
mov esi, dword [esi + 0x18]
test esi, esi
je 0x40ff2f
push esi
push str.zlib_inflateInit___error:__s._n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
push eax
push str.zlib_inflateInit___error:__d._n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
mov edx, dword [esp + 0x5c]
mov byte [edx + ebp + 0x608], 1
mov eax, edi
imul eax, eax, 0x64000
add edi, 0x20
xor edx, edx
div edi
mov ecx, ebp
mov edi, eax
and edi, 0xfffffffc
push edi
mov dword [esp + 0x28], edi
call fcn.004046e0
mov eax, 0x64000
sub eax, edi
push eax
mov ecx, ebp
call fcn.004047e0
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x200
mov dword [esp + 0x18], 0x200
jg 0x40ffaa
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
push ecx
lea eax, [ebp + 0x328]
push eax
mov ecx, ebp
call fcn.00404470
mov eax, dword [esp + 0x18]
sub dword [esp + 0x1c], eax
lea ecx, [ebp + 0x328]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov edx, dword [ebp + 0x1c4]
mov eax, dword [esp + 0x2c]
mov ecx, edi
add edx, eax
sub ecx, eax
push 2
push esi
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
call fcn.0042a930
add esp, 8
cmp eax, 0xfffffffb
je 0x410173
test eax, eax
je 0x410007
cmp eax, 1
jne 0x4101a7
mov ecx, dword [esi + 0x10]
mov eax, edi
sub eax, ecx
xor edx, edx
div dword [esp + 0x28]
mov ecx, ebp
mov edi, eax
push edi
mov dword [esp + 0x18], edi
call dword [ebp + 0x60c]
mov ecx, dword [esp + 0x24]
mov eax, edi
imul eax, dword [esp + 0x28]
sub ecx, dword [esi + 0x10]
sub ecx, eax
test ecx, ecx
mov dword [esp + 0x2c], ecx
jle 0x410052
mov edi, dword [ebp + 0x1c4]
mov edx, ecx
shr ecx, 2
lea esi, [edi + eax]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp + 0x1e4]
call fcn.004181a0
mov eax, dword [ebp + 0x3a1c]
mov ecx, dword [ebp + 0x3a20]
push eax
push ecx
mov dword [esp + 0x40], ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov esi, dword [ebp + 0x3a20]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x3a24]
push 0
push eax
push esi
mov dword [esp + 0x3c], esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
mov dword [esp + 0x44], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov eax, dword [ebp + 0x274]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
movzx eax, word [ebx + 2]
add edx, ecx
lea edi, [ecx + eax]
add edx, eax
cmp edi, edx
jge 0x410126
movzx eax, word [ebx]
movzx edx, word [ebx + 4]
lea ecx, [edx + eax]
lea esp, [esp]
mov esi, eax
cmp esi, ecx
jge 0x41010f
jmp 0x4100e0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ebp + 0x3a20]
push ecx
push edi
push esi
push edx
call dword [sym.imp.GDI32.dll_SetPixelV]
mov ecx, dword [esp + 0x18]
movzx eax, word [ebx]
add ecx, 4
mov dword [esp + 0x18], ecx
movzx ecx, word [ebx + 4]
inc esi
add ecx, eax
cmp esi, ecx
jl 0x4100e0
movzx edx, word [ebx + 2]
add edx, dword [esp + 0x14]
mov esi, dword [esp + 0x5c]
inc edi
add edx, esi
cmp edi, edx
jl 0x4100d0
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
add dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x40]
push 0
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
lea ecx, [ebp + 0x1e4]
call fcn.004181b0
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x10]
test eax, eax
mov edi, dword [esp + 0x24]
mov esi, ecx
je 0x40ffd0
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x40ff93
movzx edx, word [ebx + 6]
cmp dword [esp + 0x5c], edx
je 0x41019d
push str.Tight_encoding:_wrong_number_of_scan_lines._n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0xc
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
mov esi, dword [esi + 0x18]
test esi, esi
je 0x4101cd
push esi
push str.zlib_inflate___error:__s._n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4
push eax
push str.zlib_inflate___error:__d._n
push 0
push 0x445ec8
call fcn.00403360
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x48
ret 4